<?php
namespace App\EventListener;
use Sonata\AdminBundle\Event\ConfigureMenuEvent;
final class MenuBuilderListener
{
public function addMenuItems(ConfigureMenuEvent $event): void
{
$menu = $event->getMenu()->addChild('monitoring')->setExtras(['icon' => 'fas fa-folder'])->setLabel('Monitor');
$live = $menu->addChild('monitoring_live', [
'label' => 'Live',
'route' => 'monitoring_live',
])->setExtras([
'icon' => 'fa fa-bar-chart', // html is also supported
'class' => "treeview",
]);
$availability = $menu->addChild('monitoring_reports_availability', [
'label' => 'Availability',
'route' => 'monitoring_reports_availability',
])->setExtras([
'icon' => 'fa fa-bar-chart', // html is also supported
]);
$status = $menu->addChild('monitoring_reports_statuschange', [
'label' => 'Status Report',
'route' => 'monitoring_reports_statuschange',
])->setExtras([
'icon' => 'fa fa-bar-chart', // html is also supported
]);
}
}