Question

I'll like to know if it's possible to hide the "Add new" link in some modules, for example I have this:

Module 1 ----- Add  ------ List
Module 2 ----- Add  ------ List
Module 3 ----- Add  ------ List
Module 4 ----- Add  ------ List

But I want this:

Module 1 -----      ------ List
Module 2 ----- Add  ------ List
Module 3 ----- Add  ------ List
Module 4 -----      ------ List

How I can get this done?

Était-ce utile?

La solution

Try this, May be helpful.

    $formMapper
            ->add('Module1', null,array())
            ->add('Module2', 'sonata_type_model',array())
            ->add('Module3', 'sonata_type_model',array())
            ->add('Module4', null,array())

In add method set null second arguments to hide "add new" button

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top