Search code examples
symfonysymfony-2.3sylius

Override SyliusWebBundle Backend menu


I use Sylius Standard edition for my project. I want to extend it with some features, so I have created new Models and added them via SyliusResourceBundle. Now I want to add them to Backend main menu. How to achieve this? I guess I shouldn't change Menu in SyliusWebBundle but somehow override it, right? As all other things?


Solution

  • I guess you extended SyliusWebBundle. You can extend Sylius\Bundle\WebBundle\Menu\BackendMenuBuilder to Tom\Bundle\WebBundle\Menu\BackendMenuBuilder and change parameter

    <parameter key="sylius.menu_builder.backend.class">Sylius\Bundle\WebBundle\Menu\BackendMenuBuilder</parameter>
    

    to

    <parameter key="sylius.menu_builder.backend.class">Tom\Bundle\WebBundle\Menu\BackendMenuBuilder</parameter>