symfony

Which is the event listener after doSave() in Symfony?

Hi, I've been looking at this event-listeners page http://www.doctrine-project.org/documentation/manual/1_1/pl/event-listeners and I'm not sure which is the listener I have to use to make a change after the doSave() method in the BaseModelForm.class.php. // PlaceForm.class.php protected function doSave ( $con = null ) { ... parent:...

How stable or unstable is symfony 2.0 ?

Well, I know it's a preview, and I know it says that it's not yet ready for production, and yet I dare ask the question. I need to start building a pretty big application, which is planned to go live at around sep-oct 2010. Lets say I will not release the application to production until the stable version of symfony 2.0 will be release...

Where to save customized behavior for doctrine in a symfony1.4 project?

So that the behavior template can be autoloaded when necessary. I'm confused by the complex settings. ...

generating url Symfony sfFormExtraPlugin autocompleter

Autocompleter has a required option - url. Problem is, it is used in Form.class where neither url_for() nor $this->getController()->genUrl() works. All the examples I saw use url as literal string, i.e. $options = array('Model' => 'Model', 'url' => '/path'); Maybe I'm getting something wrong, but I believe writing urls as string is no...

Symfony sfFormExtraPlugin ajax error

I'm getting this error in Firefox javascript console. Does it mean jQuery UI is badly configured or is it programming error, e.g. bad values returned by ajax symfony action? I'm using sfFormExtraPlugin plugin's DoctrineAutocompleter... or trying to use it. Error: jQuery("#autocomplete_table1_table2").autocomplete("http://myurl/fr...

Symfony: Sharing a partial between two component actions

I have a component that has been happily building and rendering menus for a while now. Now I have to provide for a special case that shares all of the same logic, but requires a little bit of work in front of what already exists. What I'd like to do is create a new component action that will do the necessary preprocessing, punt to shared...

(tricky?) validation for a sfWidgetFormChoice form widget in Symfony

I am using Symfony 1.3.2 with Propel ORM on Ubuntu 9.10. I am writing a registration form, which requires a user to provide a user name. I want to impose the following restrictions on the choice of names: That the name is unique (i.e. is not already in use by someone else The name is not in a list of offensive names, stored in a dat...

How is the force reload of javascript/css done in Symfony?

After reading this thread: http://stackoverflow.com/questions/118884/what-is-an-elegant-way-to-force-browsers-to-reload-cached-css-js-files I would like to know if there is any built-in function or easy way in Symfony that automatically forces a reload by appending a random querystring or timestamp to the link when it has discovered th...

An example on how to embed forms in Symfony

I am using Symfony 1.3.2 with Propel ORM on Ubuntu 9.10. I have a user profile table, which has many other tables linked to it (i.e. user_profile.id is a FK in many other tables. My db schema looks something like this: user_profile: _attributes: { phpName: UserProfile } id: ~ guard_id: { type: integer, foreignTable: sf_guard_us...

.net or/and Symfony programmer?

Hello, I am study at last year of bachelor, since 1.5 year I programming at .net platform - C#, ASP.NET, WinForms, now i planning at graduation use Silverlight and WCF. In the meantime at my department will start project to rewrite our site on Symfony. I declare to be one od 2-3 persons who participation in it. But now i have doubt :/ ...

Symfony : ajax call cause server to queue next queries

Hello, I've a problem with my application when an ajax call on the server takes too much time : it queue all the others queries from the user until it's done server side (I realized that canceling the call client side has no effect and the user still have to wait). Here is my test case : <script type="text/javascript" src="jquery-1.4....

Doctrine wildcard WHERE query?

Hi, Is it possible to craft a wildcard WHERE query with Doctrine, like so: ->where('this_field = ?', ANYTHING); I'd be using this to build a search query dynamically out of unknown user-selected parameters and therefore would need to have the condition in place but capable of accepting the value "anything". To add, I can get this to...

Symfony Doctrine Schema Segmentation Fault

Hi All, I'm setting up my first symfony project, and am having trouble with the schema. I'm not sure if I'm going about it the right way. I'm having a problem with two of my classes. I have Clients, which can have many Contacts, one of the contacts needs to be selected as the invoice contact. This is my schema: NativeClient: actAs: ...

Doctrine: Multiple (whereIn OR whereIn) query?

I'm having trouble crafting a fairly simple query with Doctrine... I have two arrays ($countries, $cities) and I need to check whether database record values would match any inside either. I'm looking for something like: ->whereIn('country', 'city', $countries, $cities) ... with 'country' being a WHERE IN for $countries and 'city' be...

How to integrate a symfony website with whmcs

Hello, I'm trying to find a way to integrate my website, coded using Symfony (www.symfony-project.org) with my billing system, WHMCS (www.whmcs.com). The first thing I tried was creating a new symfony module called whmcs and in that module, I was using ob_start/require_once/ob_get_contents to retreive the page but it kept resulting in ...

Doctrine inheritance. Is there an easy way to get all child classes/tables for using them in a select field in symfony forms?

I just started to use symfony 1.4 and Doctrine. (Used 1.0 - 1.2 + Propel a lot before). I thought to give Doctrine a try, because of the fast and huge Development process in the past. Thanks to jwage ;-) Im using Table Inheritance. This is a small portion of my schema.yml: Articles: columns: id: type: integer(4) primary:...

How to dynamically populate a choices widget in symfony?

Suppose there is an image_url column in database. I want the user to choose from several recommended images,which is something like this: <input type="radio" value="domain.com/path_to_img1" name="image_url" /> <img src="domain.com/path_to_img1" /> <input type="radio" value="domain.com/path_to_img2" name="image_url" /> <img src="domain....

Is there an free text editor that supports symfony?

Especially the indentation. phpedit seems to be good,but it's not free. ...

How to refactor this symfony code??

In action.class.php: $form = new NewsForm(); $form->setWidget('thumbnail', new sfWidgetFormSelect(array('choices' => $news['images']))); $form->getWidget('summarize')->setDefault($news['summarize']); $form->getWidget('title')->setDefault($news['title']); Where $news is generated in previous steps; It looks redundant,how to refactor i...

How to change the behavior of sfWidgetFormSelectRadio in symfony?

new sfWidgetFormSelectRadio( array('choices' => $images))); The above will render each option something like: <input type="radio" name="name" value="image_path"> How to make it render this way with minimal code: <input type="radio" name="name" value="image_path"><img src="image_path" /> ...