我正在使用 SontaAdminBundle,并且我想在选项卡上组织我的显示操作。
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper
->tab('Infos personnelles')
->with('Beneficiary', array('class' => 'col-lg-6'))
->add('email')
->add('firstname')
->add('lastname')
->add('civility')
->add('dateOfBirth')
->add('enabled')
->add('address')
->end()
->end()
->tab('projects')
->with('projects')
->add('title')
->add('statusLabel')
->end()
->end();
}
但是这不起作用。是否还有其他配置要做。
谢谢
最佳答案
您使用的配置很好,您只需将您的sonata版本更新为master即可,检查此提交中的更改:
https://github.com/sonata-project/SonataAdminBundle/commit/fd1a1596f86bfb4afdafe9767efaa4c787bba6a5
更新了 SonataAdminBundle/Resources/views/CRUD/base_show.html.twig
的位置。
希望这有帮助。
关于sonata-admin - SonataAdminBundle 显示带有选项卡的 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36294251/