security = $security; } public function buildMenu($menuId, MenuItem $menu, array $parameters) { // all the entries below must have ROLE_ADMIN permissions if (!$this->security->isGranted('ROLE_ADMIN')) { return; } $menu->addChild('Budget', [ 'route' => 'chill_admin_budget', ]) ->setAttribute('class', 'list-group-item-header') ->setExtras([ 'order' => 7050, 'explain' => 'Budget resource and charge type configuration', ]); $menu ->addChild('admin.menu.Resource types', [ 'route' => 'chill_crud_resource_kind_index', ]) ->setExtras([ 'order' => 7060, ]); $menu ->addChild('admin.menu.Charge types', [ 'route' => 'chill_crud_charge_kind_index', ]) ->setExtras([ 'order' => 7070, ]); } public static function getMenuIds(): array { return ['admin_section', 'admin_budget']; } }