src/Menu/AccountMenuListener.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Menu;
  3. use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
  4. final class AccountMenuListener
  5. {
  6. public function addAccountMenuItems(MenuBuilderEvent $event): void
  7. {
  8. $menu = $event->getMenu();
  9. $menu
  10. ->addChild('new Licence', ['route' => 'get_user_autorisations'])
  11. ->setLabel('sylius.ui.my_licences')
  12. ->setLabelAttribute('icon', 'key')
  13. ;
  14. }
  15. }