<?php
/*
* This file has been created by developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* another great project.
* You can find more information about us on https://bitbag.io and write us
* an email on hello@bitbag.io.
*/
declare(strict_types=1);
namespace BitBag\SyliusB2BPlugin\Menu;
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
final class AdminOrganizationMenuListener
{
public function buildMenu(MenuBuilderEvent $event): void
{
$menu = $event->getMenu();
$customersMenu = $menu->getChild('customers');
if (null !== $customersMenu) {
$customersMenu
->addChild('organizations', [
'route' => 'bitbag_sylius_organization_plugin_admin_organization_index',
])
->setLabel('bitbag_sylius_organization_plugin.ui.organization')
->setLabelAttribute('icon', 'briefcase')
;
}
}
}