Sonataadminbundle: Multiple admin section for same entity

前端 未结 3 794
孤独总比滥情好
孤独总比滥情好 2021-02-01 18:42

I have entity class Page with column type=integer. When I do:

   

        
3条回答
  •  隐瞒了意图╮
    2021-02-01 19:34

    Sonata creates routes automatically based on your entity names. So if you have 2 admin classes, there is a conflict. You have to configure different route pattern.

    Add this property to Main\ProgramBundle\Admin\GroupAdmin.php:

    protected $baseRouteName = 'page_group';
    protected $baseRoutePattern = 'page-group';
    

提交回复
热议问题