180 lines
5.6 KiB
PHP
180 lines
5.6 KiB
PHP
<?php
|
|
|
|
namespace App\Menu;
|
|
|
|
use App\Entity\Upload;
|
|
use Knp\Menu\ItemInterface;
|
|
|
|
class ManagerMenuBuilder extends AbstractMenuBuilder
|
|
{
|
|
public function createMainMenu(array $options): ItemInterface
|
|
{
|
|
$menu = $this->createRootElement();
|
|
|
|
$menu->addChild('Dashboard', [
|
|
'route' => 'app_manager_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Dashboard',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'chart',
|
|
],
|
|
]);
|
|
$menu->addChild('Einsatzübersicht', [
|
|
'route' => 'app_administrative_assignment_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Einsatzübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'calendar',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_assignment_/'],
|
|
],
|
|
],
|
|
]);
|
|
$documentMenu = $menu->addChild('Dokumentenübersicht', [
|
|
'route' => 'app_administrative_document_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Dokumentenübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'document',
|
|
],
|
|
]);
|
|
$documentMenu->addChild('akzeptierte Honorarnoten', [
|
|
'route' => 'app_administrative_document_accepted',
|
|
'routeParameters' => [
|
|
'type' => Upload::TYPE_INVOICE,
|
|
],
|
|
'linkAttributes' => [
|
|
'title' => 'akzeptierte Honorarnoten',
|
|
],
|
|
]);
|
|
$documentMenu->addChild('geprüfte Honorverträge', [
|
|
'route' => 'app_administrative_document_accepted',
|
|
'routeParameters' => [
|
|
'type' => Upload::TYPE_CONTRACT,
|
|
],
|
|
'linkAttributes' => [
|
|
'title' => 'geprüfte Honorverträge',
|
|
],
|
|
]);
|
|
$menu->addChild('Teamübersicht', [
|
|
'route' => 'app_administrative_teamer_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Teamübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'users',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_teamer_/']
|
|
],
|
|
],
|
|
]);
|
|
$menu->addChild('Feedbackübersicht', [
|
|
'route' => 'app_administrative_feedback_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Feedbackübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'feedback',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_feedback_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu = $menu->addChild('Einstellungen', [
|
|
'linkAttributes' => [
|
|
'title' => 'Einstellungen',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'settings',
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Reisen', [
|
|
'route' => 'app_administrative_system_destination_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Reisen',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_destination_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('FAQ', [
|
|
'route' => 'app_administrative_system_faq_index',
|
|
'linkAttributes' => [
|
|
'title' => 'FAQ',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_faq_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('News', [
|
|
'route' => 'app_administrative_system_news_index',
|
|
'linkAttributes' => [
|
|
'title' => 'News',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_news_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Dokumente', [
|
|
'route' => 'app_administrative_system_document_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Dokumente',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_document_/']
|
|
],
|
|
],
|
|
]);
|
|
|
|
$this->addAdminItem($menu);
|
|
$this->addTeamerItem($menu);
|
|
$this->addHouseManagerItem($menu);
|
|
$this->addLogoutItem($menu);
|
|
|
|
return $menu;
|
|
}
|
|
|
|
public function createTeamerMenu(array $options): ItemInterface
|
|
{
|
|
$menu = $this->createRootElement();
|
|
|
|
$menu->addChild('Stammdaten & Foto', [
|
|
'route' => 'app_administrative_teamer_profile',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Stammdaten & Foto',
|
|
],
|
|
]);
|
|
$menu->addChild('Vergangene Einsätze', [
|
|
'route' => 'app_administrative_teamer_recent_assignments',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Vergangene Einsätze',
|
|
],
|
|
]);
|
|
|
|
$this->addDivider($menu);
|
|
|
|
$request = $this->requestStack->getMainRequest();
|
|
|
|
$menu->addChild('zurück zur Übersicht', [
|
|
'uri' => rawurldecode($request->get('r')),
|
|
'extras' => [
|
|
'icon' => 'arrow-left',
|
|
],
|
|
]);
|
|
|
|
return $menu;
|
|
}
|
|
}
|