Wednesday 15 January 2014

php - How to use: sonata_type_model_list -


I'm trying to run this code:

  if (! $ This -> gt;; child ()) {$ formMapper-> Add ('post', 'sonata_type_model', array (), array ('edit' = & gt; 'list'));   

From this tutorial:

I know that you will have to use sonata_type_model_list as 2.1

sonata_type_model_list: Instead of the option edit = list provided on sonata_type_model as a fourth argument

The problem is that I do not know exactly how to do this after all the days of Google searches Zero instances have been found anywhere. Edit what I have to do = Edit & gt; List is to replace with sonata_type_model_list.

Can you please tell me how to do it in a later version?

In this way I used it in my code. However it is not working in all browsers. When I select the taget unit, the value of the form is not updated in the original view (Firefox and IE).

  $ formMapper-> ... - & gt; Add ('image', 'sonata_type_model_list', array ('campus' = & gt; true, 'by-reference' = & gt; true)) ...   

I Some tutorials / examples about how to use this type also seem very difficult to find. The best part is that you can go through your source code. That takes terrible time.

In one way I came to know how to configure this form type to provide the wrong argument.

  For example 'My_compound' = & gt; True,   

This tells you an error that 'my_compound' is not a valid parameter and will show you a list of valid criteria. Hope it helps!

No comments:

Post a Comment