<?php
namespace App\Component\AdminMenu\EventSubscriber;
use App\Component\AdminMenu\Event\AbstractBuildMenuEvent;
class SuperAdminMenuSubscriber extends AbstractMenuBuildEventSubscriber
{
protected static int $priority = 1000;
public function buildMenu(AbstractBuildMenuEvent $event)
{
if (!$this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) {
return;
}
$this->getMenuBuilder($event->getMenu())
->addMainItem('Admin', 'fal fa-user-shield')
->addOverlay()
->addSection('Administrator')
->addColumn()
->addItem('System', 'admin_system')
->addItem('Styling', 'admin_styling')
->addItem('Features', 'admin_features')
->addItem('Sites', 'admin_site_index')
->addItem('Configuration list', 'admin_configuration')
->addItem('Customer', 'admin_customer_index')
->addItem('Customer sites', 'admin_customer_site_index')
->addItem('Notifications', 'admin_notifications')
->addItem('Audit log', 'admin_auditlog_index')
;
}
}