Skip to main content
Version: 4.1

Menu Bundle

The Menu Bundle simplifies the creation of Pimcore menus based on permissions, enhancing the user interface and navigation experience.

Installation Process

To install the Menu Bundle, use Composer:

$ composer require coreshop/menu-bundle:^4.0

Integrating with the Kernel

Enable the bundle in the kernel by updating the AppKernel.php file:


// app/AppKernel.php

public function registerBundlesToCollection(BundleCollection $collection)
new \CoreShop\Bundle\MenuBundle\CoreShopMenuBundle(),

Usage Instructions

Creating a New Menu

  1. Define a Menu Builder Class: Create a new class for your menu, such as MyMenuBuilder.

    namespace AppBundle\Menu;

    use CoreShop\Bundle\MenuBundle\Builder\MenuBuilderInterface;
    use Knp\Menu\FactoryInterface;
    use Knp\Menu\ItemInterface;

    class MyMenuBuilder implements MenuBuilderInterface
    public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, string $type)
    ->setAttribute('permission', 'my_menu_item')
    ->setAttribute('iconCls', 'pimcore_icon_delete');
  2. Register the Menu Builder: Register your menu builder class in the Symfony container.

    class: AppBundle\Menu\MyMenuBuilder
    - { name:, type: my_menu, menu: my_menu }

Implementing the ExtJs JavaScript Part

  1. Add a JavaScript File: In your bundle's Bundle.php file, add the JavaScript file to the jsPaths array: /admin/coreshop/coreshop.my_menu/menu.js

  2. Instantiate the Menu: In your startup.js file, instantiate the menu:


    pimcore.eventDispatcher.registerTarget('coreshopMenuOpen', new (Class.create({
    coreshopMenuOpen: function(type, item) {
    if ( === 'my-menu-item') {
    alert('My Menu Item has been clicked');