答案 0 :(得分:1)
在YourBundle / Resources / config / admin.yml中 添加:
services:
tabssoft.admin.company:
class: Tabssoft\CompanyBundle\Admin\CompanyAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: "General", label: "Company" }
arguments:
- ~
- Tabssoft\CompanyBundle\Entity\Company
- TabssoftCompanyBundle:CompanyCRUD
calls:
- [ setTranslationDomain, [TabssoftCompanyBundle]]
tabssoft.admin.job:
class: Tabssoft\CompanyBundle\Admin\JobAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: "General", label: "Job" }
arguments:
- ~
- Tabssoft\CompanyBundle\Entity\Job
- ~
calls:
- [ setTranslationDomain, [TabssoftCompanyBundle]]
然后在imports:
下的app / config / config.yml中添加:
- { resource: @TabssoftCompanyBundle/Resources/config/admin.yml }
然后在groups:
下的app / config / sonata / sonata_admin.yml中添加:
sonata.admin.group.tabssoft:
label: General
label_catalogue: TabssoftCompanyBundle
icon: '<i class="fa fa-th"></i>'
items:
- tabssoft.admin.company
- tabssoft.admin.job
明确可以