Symfony2, Sonata : Collapsed group

*爱你&永不变心* 提交于 2020-01-05 02:30:48

问题


I've been trying to do something relatively simple but that does not work.

I want to be able to collapse groups in sonata to enhance the user's experience.

->with('MyGroup', array('collapsed' => true))
    -add('MyField')
->end();

This is based on the Sonata documentation.

Pretty simple but i can't see why it does not work. Does array('collapsed' => true) is not enough?

Is it an issue?


回答1:


The collapsed option seems to have been removed in the latest version of Sonata :

  • in 2.1 it is available https://github.com/sonata-project/SonataAdminBundle/blob/2.1/Resources/views/CRUD/base_edit_form.html.twig#L21

  • in 2.2 and latest it is not, there is only one reference of collapsed in the file, which is for a css class. https://github.com/sonata-project/SonataAdminBundle/blob/2.2/Resources/views/CRUD/base_edit_form.html.twig#L41

Changelog 2.2 : https://github.com/sonata-project/SonataAdminBundle/blob/master/UPGRADE-2.2.md



来源:https://stackoverflow.com/questions/29105087/symfony2-sonata-collapsed-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!