kunstmaan/bundles-cms
Kunstmaan CMS is a full-featured, multilingual CMS built on the Symfony full-stack framework. It offers page and form assembly, versioning, workflow, translation tools, and media management, plus integrations with community bundles.
Customizing the top menu of the admin interface can be achieved by creating a service which implements the Kunstmaan\AdminBundle\Helper\Menu\MenuAdaptorInterface. The service you created should provide an implementation for the function:
adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null)
In the adaptChildren function it is possible to customize the children for the given parent by adding or removing menu items in the children array. There are different types of menu items:
When the service is created, you still need to tag the service with the 'kunstmaan_admin.menu.adaptor' tag. An example of this is the SettingsMenuAdaptor:
kunstmaan_admin.menu.adaptor.settings:
class: Kunstmaan\AdminBundle\Helper\Menu\SettingsMenuAdaptor
tags:
- { name: 'kunstmaan_admin.menu.adaptor' }
If you only wish to add a simple menu item (for example under the "Modules" section), you can use the SimpleMenuAdaptor by adding a configuration:
kunstmaan_admin:
menu_items:
- route: AcmeBundle_mymodule_list # your route name
label: FooBaring Module
parent: ~ # attach it under specified menu item, default: KunstmaanAdminBundle_modules
params: { source: "menuitem" } # optional, array with custom route parameters
role: ROLE_ADMIN # optional, only show for users with this role
How can I help you explore Laravel packages today?