chore: refactor menu building
This commit is contained in:
@@ -26,51 +26,6 @@ abstract class AbstractMenuBuilder
|
||||
return $this->factory->createItem('root');
|
||||
}
|
||||
|
||||
protected function createMenu(array $menuItems): ItemInterface
|
||||
{
|
||||
$menu = $this->createRootElement();
|
||||
|
||||
foreach ($menuItems as $menuItem) {
|
||||
$addedItem = $this->createMenuItem($menu, $menuItem);
|
||||
if (isset($menuItem['hideChildren'])&& true === $menuItem['hideChildren']) {
|
||||
$addedItem->setDisplayChildren(false);
|
||||
}
|
||||
if (isset($menuItem['children'])) {
|
||||
foreach ($menuItem['children'] as $subMenuItem) {
|
||||
$addedSubItem = $this->createMenuItem($addedItem, $subMenuItem);
|
||||
if (isset($subMenuItem['children'])) {
|
||||
$addedSubItem->setDisplayChildren(false);
|
||||
foreach ($subMenuItem['children'] as $hiddenItem) {
|
||||
$this->createMenuItem($addedSubItem, $hiddenItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
protected function createMenuItem(ItemInterface $menu, array $options): ItemInterface
|
||||
{
|
||||
$itemOptions = [];
|
||||
if (false !== $options['route']) {
|
||||
$itemOptions['route'] = $options['route'];
|
||||
$itemOptions['linkAttributes'] = ['title' => $options['title']];
|
||||
}
|
||||
if (isset($options['routeParameters'])) {
|
||||
$itemOptions['routeParameters'] = $options['routeParameters'];
|
||||
}
|
||||
if (isset($options['icon'])) {
|
||||
$itemOptions['extras']['icon'] = $options['icon'];
|
||||
}
|
||||
|
||||
return $menu
|
||||
->addChild($options['title'], $itemOptions)
|
||||
->setChildrenAttribute('title', $options['title'])
|
||||
;
|
||||
}
|
||||
|
||||
protected function getDefaultRouteParameters(string $parameter = 'id', string $default = '0'): array
|
||||
{
|
||||
return [$parameter => $this->requestStack->getMainRequest()->get($parameter, $default)];
|
||||
@@ -80,11 +35,15 @@ abstract class AbstractMenuBuilder
|
||||
{
|
||||
if ($this->security->isGranted('ROLE_ADMIN')) {
|
||||
$this->addDivider($menu);
|
||||
$menu
|
||||
->addChild('zum Adminbereich', ['route' => 'app_admin_index'])
|
||||
->setChildrenAttribute('title', 'zum Adminbereich')
|
||||
->setExtra('icon', 'user')
|
||||
;
|
||||
$menu->addChild('zum Adminbereich', [
|
||||
'route' => 'app_admin_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'zum Adminbereich',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'user',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,11 +51,15 @@ abstract class AbstractMenuBuilder
|
||||
{
|
||||
if ($this->security->isGranted('ROLE_TEAMER')) {
|
||||
$this->addDivider($menu);
|
||||
$menu
|
||||
->addChild('zum Teambereich', ['route' => 'app_teamer_index'])
|
||||
->setChildrenAttribute('title', 'zum Teambereich')
|
||||
->setExtra('icon', 'user')
|
||||
;
|
||||
$menu->addChild('zum Teambereich', [
|
||||
'route' => 'app_teamer_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'zum Teambereich',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'user',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,11 +67,15 @@ abstract class AbstractMenuBuilder
|
||||
{
|
||||
if ($this->security->isGranted('ROLE_HOUSE_MANAGER')) {
|
||||
$this->addDivider($menu);
|
||||
$menu
|
||||
->addChild('zum Hausleitungsbereich', ['route' => 'app_house_manager_index'])
|
||||
->setChildrenAttribute('title', 'zum Hausleitungsbereich')
|
||||
->setExtra('icon', 'user')
|
||||
;
|
||||
$menu->addChild('zum Hausleitungsbereich', [
|
||||
'route' => 'app_house_manager_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'zum Hausleitungsbereich',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'user',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,26 +88,26 @@ abstract class AbstractMenuBuilder
|
||||
if ($token instanceof SwitchUserToken) {
|
||||
/** @var User $originalUser */
|
||||
$originalUser = $token->getOriginalToken()->getUser();
|
||||
$menu
|
||||
->addChild('Logout', [
|
||||
'route' => $originalUser->getDefaultRoute(),
|
||||
'routeParameters' => ['_switch_user' => '_exit'],
|
||||
'linkAttributes' => [
|
||||
'title' => 'zurück',
|
||||
],
|
||||
])
|
||||
->setExtra('icon', 'logout')
|
||||
;
|
||||
$menu->addChild('zum eigenen Benutzer', [
|
||||
'route' => $originalUser->getDefaultRoute(),
|
||||
'routeParameters' => ['_switch_user' => '_exit'],
|
||||
'linkAttributes' => [
|
||||
'title' => 'zurück',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'logout',
|
||||
],
|
||||
]);
|
||||
} else {
|
||||
$menu
|
||||
->addChild('Logout', [
|
||||
'route' => 'app_security_logout',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Logout',
|
||||
],
|
||||
])
|
||||
->setExtra('icon', 'logout')
|
||||
;
|
||||
$menu->addChild('Logout', [
|
||||
'route' => 'app_security_logout',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Logout',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'logout',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+196
-151
@@ -6,158 +6,167 @@ use Knp\Menu\ItemInterface;
|
||||
|
||||
class AdminMenuBuilder extends AbstractMenuBuilder
|
||||
{
|
||||
private function getMainMenuItems(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'route' => 'app_admin_index',
|
||||
'title' => 'Dashboard',
|
||||
'icon' => 'chart',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_assignment_index',
|
||||
'title' => 'Einsatzübersicht',
|
||||
'icon' => 'calendar',
|
||||
'hideChildren' => true,
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_admin_assignment_detail',
|
||||
'title' => 'Einsatzdetails',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_application_index',
|
||||
'title' => 'Bewerbungsübersicht',
|
||||
'icon' => 'mail',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_document_index',
|
||||
'title' => 'Dokumentenübersicht',
|
||||
'icon' => 'document',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_teamer_index',
|
||||
'title' => 'Teamübersicht',
|
||||
'icon' => 'users',
|
||||
'hideChildren' => true,
|
||||
'children' => $this->getTeamerMenuItems(),
|
||||
],
|
||||
[
|
||||
'route' => false,
|
||||
'title' => 'Einstellungen',
|
||||
'icon' => 'settings',
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_admin_system_availability_index',
|
||||
'title' => 'Verfügbarkeiten',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_fee_index',
|
||||
'title' => 'Honorare',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_training_index',
|
||||
'title' => 'Fortbildungen',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_job_profile_index',
|
||||
'title' => 'Jobprofile',
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_admin_system_job_profile_create',
|
||||
'title' => 'Jobprofil anlegen',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_job_profile_edit',
|
||||
'routeParameters' => $this->getDefaultRouteParameters(),
|
||||
'title' => 'Jobprofil bearbeiten',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_feedback_set_index',
|
||||
'title' => 'Feedback-Vorlagen',
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_admin_system_feedback_set_create',
|
||||
'title' => 'Feedback-Vorlage anlegen',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_feedback_set_edit',
|
||||
'routeParameters' => $this->getDefaultRouteParameters(),
|
||||
'title' => 'Feedback-Vorlage bearbeiten',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_faq_index',
|
||||
'title' => 'FAQ',
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_admin_system_faq_create',
|
||||
'title' => 'FAQ-Eintrag anlegen',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_faq_edit',
|
||||
'routeParameters' => $this->getDefaultRouteParameters(),
|
||||
'title' => 'FAQ-Eintrag bearbeiten',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_document_index',
|
||||
'title' => 'Dokumente',
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_system_contact_index',
|
||||
'title' => 'Ansprechperson',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_log_index',
|
||||
'title' => 'Logs',
|
||||
'icon' => 'list',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
private function getTeamerMenuItems(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'route' => 'app_admin_teamer_profile',
|
||||
'title' => 'Stammdaten & Foto',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_teamer_skills',
|
||||
'title' => 'Jobprofile & Skills',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_teamer_availability',
|
||||
'title' => 'Verfügbarkeit',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_teamer_crm_selections',
|
||||
'title' => 'Selektionsmerkmale',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
],
|
||||
[
|
||||
'route' => 'app_admin_teamer_recent_assignments',
|
||||
'title' => 'Vergangene Einsätze',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function createMainMenu(array $options): ItemInterface
|
||||
{
|
||||
$menu = $this->createMenu($this->getMainMenuItems());
|
||||
$menu = $this->createRootElement();
|
||||
|
||||
$menu->addChild('Dashboard', [
|
||||
'route' => 'app_admin_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dashboard',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'chart',
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Einsatzübersicht', [
|
||||
'route' => 'app_admin_assignment_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Einsatzübersicht',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'calendar',
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_assignment_/'],
|
||||
],
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Bewerbungsübersicht', [
|
||||
'route' => 'app_admin_application_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Bewerbungsübersicht',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'mail',
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Dokumentenübersicht', [
|
||||
'route' => 'app_admin_document_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dokumentenübersicht',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'document',
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Teamübersicht', [
|
||||
'route' => 'app_admin_teamer_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Teamübersicht',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'users',
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_teamer_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu = $menu->addChild('Einstellungen', [
|
||||
'linkAttributes' => [
|
||||
'title' => 'Einstellungen',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'settings',
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Verfügbarkeiten', [
|
||||
'route' => 'app_admin_system_availability_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Verfügbarkeiten',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_availability_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Honorare', [
|
||||
'route' => 'app_admin_system_fee_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Honorare',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_fee_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Fortbildungen', [
|
||||
'route' => 'app_admin_system_training_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Fortbildungen',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_training_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Jobprofile', [
|
||||
'route' => 'app_admin_system_job_profile_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Jobprofile',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_job_profile_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Feedbackvorlagen', [
|
||||
'route' => 'app_admin_system_feedback_set_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Feedbackvorlagen',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_feedback_set_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('FAQ', [
|
||||
'route' => 'app_admin_system_faq_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'FAQ',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_faq_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Dokumente', [
|
||||
'route' => 'app_admin_system_document_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dokumente',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_document_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Ansprechpersonen', [
|
||||
'route' => 'app_admin_system_contact_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Ansprechpersonen',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_contact_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
$menu->addChild('Logs', [
|
||||
'route' => 'app_admin_log_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Logs',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'list',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->addTeamerItem($menu);
|
||||
$this->addHouseManagerItem($menu);
|
||||
@@ -168,7 +177,43 @@ class AdminMenuBuilder extends AbstractMenuBuilder
|
||||
|
||||
public function createTeamerMenu(array $options): ItemInterface
|
||||
{
|
||||
$menu = $this->createMenu($this->getTeamerMenuItems());
|
||||
$menu = $this->createRootElement();
|
||||
|
||||
$menu->addChild('Stammdaten & Foto', [
|
||||
'route' => 'app_admin_teamer_profile',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
'linkAttributes' => [
|
||||
'title' => 'Stammdaten & Foto',
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Jobprofile & Skills', [
|
||||
'route' => 'app_admin_teamer_skills',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
'linkAttributes' => [
|
||||
'title' => 'Jobprofile & Skills',
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Verfügbarkeit', [
|
||||
'route' => 'app_admin_teamer_availability',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
'linkAttributes' => [
|
||||
'title' => 'Verfügbarkeit',
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Selektionsmerkmale', [
|
||||
'route' => 'app_admin_teamer_crm_selections',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
'linkAttributes' => [
|
||||
'title' => 'Selektionsmerkmale',
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Vergangene Einsätze', [
|
||||
'route' => 'app_admin_teamer_recent_assignments',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
'linkAttributes' => [
|
||||
'title' => 'Vergangene Einsätze',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->addDivider($menu);
|
||||
|
||||
|
||||
@@ -8,28 +8,29 @@ class HouseManagerMenuBuilder extends AbstractMenuBuilder
|
||||
{
|
||||
public function createMainMenu(array $options): ItemInterface
|
||||
{
|
||||
$menuItems = [
|
||||
[
|
||||
'route' => 'app_house_manager_index',
|
||||
$menu = $this->createRootElement();
|
||||
|
||||
$menu->addChild('Dashboard', [
|
||||
'route' => 'app_house_manager_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dashboard',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'chart',
|
||||
],
|
||||
[
|
||||
'route' => 'app_house_manager_feedback_index',
|
||||
]);
|
||||
$menu->addChild('Feedback', [
|
||||
'route' => 'app_house_manager_feedback_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Feedback',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'feedback',
|
||||
'hideChildren' => true,
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_house_manager_feedback_provide',
|
||||
'title' => 'Feedback abgeben',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
]
|
||||
'routes' => [
|
||||
['pattern' => '/^app_house_manager_feedback_/'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$menu = $this->createMenu($menuItems);
|
||||
]);
|
||||
|
||||
$this->addAdminItem($menu);
|
||||
$this->addTeamerItem($menu);
|
||||
|
||||
@@ -8,97 +8,110 @@ class TeamerMenuBuilder extends AbstractMenuBuilder
|
||||
{
|
||||
public function createMainMenu(array $options): ItemInterface
|
||||
{
|
||||
$menuItems = [
|
||||
[
|
||||
'route' => 'app_teamer_index',
|
||||
$menu = $this->createRootElement();
|
||||
|
||||
$menu->addChild('Dashboard', [
|
||||
'route' => 'app_teamer_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dashboard',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'chart',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_assignment_index',
|
||||
]);
|
||||
$menu->addChild('Einsatzübersicht', [
|
||||
'route' => 'app_teamer_assignment_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Einsatzübersicht',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'calendar',
|
||||
'hideChildren' => true,
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_teamer_assignment_detail',
|
||||
'title' => 'Einsatzdetails',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
]
|
||||
'routes' => [
|
||||
['pattern' => '/^app_teamer_assignment_/']
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => false,
|
||||
'title' => 'Mein Profil',
|
||||
]);
|
||||
$profileMenu = $menu->addChild('Mein Profil', [
|
||||
'extras' => [
|
||||
'icon' => 'profile',
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_teamer_profile_index',
|
||||
'title' => 'Stammdaten und Foto',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_profile_skills',
|
||||
'title' => 'Jobprofile & Skills',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_profile_availability_index',
|
||||
'title' => 'Meine Verfügbarkeit',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => false,
|
||||
'title' => 'Meine Einsätze',
|
||||
]);
|
||||
$profileMenu->addChild('Stammdaten & Foto', [
|
||||
'route' => 'app_teamer_profile_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Stammdaten & Foto',
|
||||
],
|
||||
]);
|
||||
$profileMenu->addChild('Jobprofile & Skills', [
|
||||
'route' => 'app_teamer_profile_skills',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Jobprofile & Skills',
|
||||
],
|
||||
]);
|
||||
$profileMenu->addChild('Meine Verfügbarkeit', [
|
||||
'route' => 'app_teamer_profile_availability_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Meine Verfügbarkeit',
|
||||
],
|
||||
]);
|
||||
|
||||
$dispositionMenu = $menu->addChild('Meine Einsätze', [
|
||||
'extras' => [
|
||||
'icon' => 'bus',
|
||||
'children' => [#
|
||||
[
|
||||
'route' => 'app_teamer_bookmark_index',
|
||||
'title' => 'Merkliste',
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_teamer_assignment_detail',
|
||||
'title' => 'Einsatzdetails',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
]
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_application_index',
|
||||
'title' => 'Offene Bewerbungen',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_disposition_upcoming',
|
||||
'title' => 'Nächste Einsätze',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_disposition_recent',
|
||||
'title' => 'Letzte Einsätze',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_document',
|
||||
]);
|
||||
$dispositionMenu->addChild('Merkliste', [
|
||||
'route' => 'app_teamer_bookmark_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Merkliste',
|
||||
],
|
||||
]);
|
||||
$dispositionMenu->addChild('Offene Bewerbungen', [
|
||||
'route' => 'app_teamer_application_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Offene Bewerbungen',
|
||||
],
|
||||
]);
|
||||
$dispositionMenu->addChild('Nächste Einsätze', [
|
||||
'route' => 'app_teamer_disposition_upcoming',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Nächste Einsätze',
|
||||
],
|
||||
]);
|
||||
$dispositionMenu->addChild('Letze Einsätze', [
|
||||
'route' => 'app_teamer_disposition_recent',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Letze Einsätze',
|
||||
],
|
||||
]);
|
||||
|
||||
$menu->addChild('Dokumente', [
|
||||
'route' => 'app_teamer_document',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dokumente',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'document',
|
||||
],
|
||||
[
|
||||
'route' => false,
|
||||
'title' => 'FAQ & Kontakt',
|
||||
'icon' => 'info',
|
||||
'children' => [
|
||||
[
|
||||
'route' => 'app_teamer_faq',
|
||||
'title' => 'FAQ',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_contact',
|
||||
'title' => 'Kontakt',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
]);
|
||||
|
||||
$menu = $this->createMenu($menuItems);
|
||||
$infoMenu = $menu->addChild('FAQ & Kontakt', [
|
||||
'extras' => [
|
||||
'icon' => 'info',
|
||||
],
|
||||
]);
|
||||
$infoMenu->addChild('FAQ', [
|
||||
'route' => 'app_teamer_faq',
|
||||
'linkAttributes' => [
|
||||
'title' => 'FAQ',
|
||||
],
|
||||
]);
|
||||
$infoMenu->addChild('Kontakt', [
|
||||
'route' => 'app_teamer_contact',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Kontakt',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->addAdminItem($menu);
|
||||
$this->addHouseManagerItem($menu);
|
||||
|
||||
Reference in New Issue
Block a user