symfony1 - Form : sfWidgetFormDoctrineChoice, choose the method -


I want to use a widget principle in my form, but I do not use the method to display its result Could change the principle of the query.

I have created a function in my model:

  public function quatier () {return $ this- & gt; GetQuartier (); }  

And MyClassForm:

  $ this-> widgetSchema [ 'list_quartiers'] = new SfWidgetFormDoctrineChoice (array ( 'model' = & gt; fragmentation ',' Add_empty '= & gt; wrong,' method '= & gt;' quartiers () ',' query '= & gt; $ result = doctrine_Query :: create () - & gt; select (' p. quartier '- & gt; the (' Parclogement p '- & gt; GroupBy (' quartier '));  

I have this error:

  unknown method Parclogement :: Quartiers ()  

when I tries with its widget default method (__toString), then it works.

< P>

It may be that after the 'quartiers ()' brackets Land? Try to make it 'method' => 'quartiers'?


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -