SchulIT /
icc
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Menu; |
||
| 4 | |||
| 5 | use Knp\Menu\ItemInterface; |
||
| 6 | |||
| 7 | class SystemMenuBuilder extends AbstractMenuBuilder { |
||
| 8 | public function systemMenu(array $options): ItemInterface { |
||
|
0 ignored issues
–
show
|
|||
| 9 | $root = $this->factory->createItem('root') |
||
| 10 | ->setChildrenAttributes([ |
||
| 11 | 'class' => 'navbar-nav float-lg-right' |
||
| 12 | ]); |
||
| 13 | |||
| 14 | $menu = $root->addChild('system', [ |
||
| 15 | 'label' => '' |
||
| 16 | ]) |
||
| 17 | ->setExtra('icon', 'fa fa-tools') |
||
| 18 | ->setExtra('menu', 'system') |
||
| 19 | ->setExtra('menu-container', '#submenu') |
||
| 20 | ->setExtra('pull-right', true) |
||
| 21 | ->setAttribute('title', $this->translator->trans('system.label')); |
||
| 22 | |||
| 23 | if($this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) { |
||
| 24 | $menu->addChild('cron.label', [ |
||
| 25 | 'route' => 'admin_cronjobs' |
||
| 26 | ]) |
||
| 27 | ->setExtra('icon', 'fas fa-history'); |
||
| 28 | |||
| 29 | $menu->addChild('logs.label', [ |
||
| 30 | 'route' => 'admin_logs' |
||
| 31 | ]) |
||
| 32 | ->setExtra('icon', 'fas fa-clipboard-list'); |
||
| 33 | |||
| 34 | $menu->addChild('messenger.label', [ |
||
| 35 | 'route' => 'admin_messenger' |
||
| 36 | ]) |
||
| 37 | ->setExtra('icon', 'fas fa-envelope-open-text'); |
||
| 38 | |||
| 39 | $menu->addChild('audit.label', [ |
||
| 40 | 'uri' => '/admin/audit' |
||
| 41 | ]) |
||
| 42 | ->setLinkAttribute('target', '_blank') |
||
| 43 | ->setExtra('icon', 'far fa-eye'); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $root; |
||
| 47 | } |
||
| 48 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.