vendor/bitbag/sylius-b2b-plugin/src/Organization/Menu/AdminOrganizationMenuListener.php line 19

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file has been created by developers from BitBag.
  4.  * Feel free to contact us once you face any issues or want to start
  5.  * another great project.
  6.  * You can find more information about us on https://bitbag.io and write us
  7.  * an email on hello@bitbag.io.
  8.  */
  9. declare(strict_types=1);
  10. namespace BitBag\SyliusB2BPlugin\Menu;
  11. use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
  12. final class AdminOrganizationMenuListener
  13. {
  14.     public function buildMenu(MenuBuilderEvent $event): void
  15.     {
  16.         $menu $event->getMenu();
  17.         $customersMenu $menu->getChild('customers');
  18.         if (null !== $customersMenu) {
  19.             $customersMenu
  20.                 ->addChild('organizations', [
  21.                     'route' => 'bitbag_sylius_organization_plugin_admin_organization_index',
  22.                 ])
  23.                 ->setLabel('bitbag_sylius_organization_plugin.ui.organization')
  24.                 ->setLabelAttribute('icon''briefcase')
  25.             ;
  26.         }
  27.     }
  28. }