问题
I'm using SonataAdminBundle to generate a CRUD for my Page entity.
With the yaml file bellow the menu is displayed in the sidebar.
I would like to change the group default icon which is "fa fa-folder".
But I don't find the option to do it.
sonata.admin.page:
class: FM\AppBundle\Admin\Page\Page
tags:
- { name: sonata.admin, manager_type: orm, group: "CMS", label: "Pages" }
arguments:
- ~
- FM\AppBundle\Entity\Page\Page
- ~
回答1:
"icon" option:
icon: "<i class=\"fa fa-folder\"></i>"
In your example:
sonata.admin.page:
class: FM\AppBundle\Admin\Page\Page
tags:
- { name: sonata.admin, manager_type: orm, group: "CMS", label: "Pages", icon: "<i class=\"fa fa-folder\"></i>" }
arguments:
- ~
- FM\AppBundle\Entity\Page\Page
- ~
来源:https://stackoverflow.com/questions/36569887/sonataadminbundle-custom-group-icon