WIP: Implement menu/navigation
This commit is contained in:
1 parent
c3c2e1ae2d
commit
3e0353c79b
24 files changed
+475
-92
No files matched your search
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
namespace App\Menu;
|
||||
|
||||
use Knp\Menu\ItemInterface;
|
||||
|
||||
class TeamerMenuBuilder extends AbstractMenuBuilder
|
||||
{
|
||||
public function createHeaderMenu(array $options): ItemInterface
|
||||
{
|
||||
$menu = $this->createRootElement('menu menu--header');
|
||||
|
||||
$this->addLogoutItem($menu);
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
public function createMainMenu(array $options): ItemInterface
|
||||
{
|
||||
$menu = $this->createRootElement('menu menu--main');
|
||||
|
||||
|
||||
$menu
|
||||
->addChild('Einsatzübersicht', ['route' => 'app_teamer_disposition_index'])
|
||||
->setLinkAttributes([
|
||||
'title' => 'Einsatzübersicht',
|
||||
'class' => 'icon-link',
|
||||
])
|
||||
->setExtra('icon', 'calendar')
|
||||
->setExtra('icon_only', false)
|
||||
;
|
||||
|
||||
|
||||
$profileMenu = $menu
|
||||
->addChild('Mein Profil')
|
||||
->setExtra('icon', 'user')
|
||||
->setExtra('icon_only', false)
|
||||
;
|
||||
$profileMenu
|
||||
->addChild('Stammdaten und Foto', ['route' => 'app_teamer_profile_index'])
|
||||
->setLinkAttributes([
|
||||
'title' => 'Mein Profil',
|
||||
])
|
||||
;
|
||||
$profileMenu
|
||||
->addChild('Jobprofile & Skills', ['route' => 'app_teamer_profile_skills'])
|
||||
->setLinkAttributes([
|
||||
'title' => 'Jobprofile & Skills',
|
||||
])
|
||||
;
|
||||
$profileMenu
|
||||
->addChild('Meine Verfügbarkeit', ['route' => 'app_teamer_profile_availabilities'])
|
||||
->setLinkAttributes([
|
||||
'title' => 'Meine Verfügbarkeit',
|
||||
])
|
||||
;
|
||||
|
||||
|
||||
$dispositionMenu = $menu
|
||||
->addChild('Meine Einsätze')
|
||||
->setExtra('icon', 'calendar')
|
||||
->setExtra('icon_only', false)
|
||||
;
|
||||
$dispositionMenu
|
||||
->addChild('Merkliste', ['route' => 'app_teamer_disposition_watchlist'])
|
||||
->setLinkAttributes([
|
||||
'title' => 'Merkliste',
|
||||
])
|
||||
;
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
public function createMobileMenu(array $options): ItemInterface
|
||||
{
|
||||
$menu = $this->createRootElement('menu menu--mobile');
|
||||
|
||||
$menu
|
||||
->addChild('Profil', ['route' => 'app_teamer_profile_index'])
|
||||
->setLinkAttributes([
|
||||
'title' => 'Mein Profil',
|
||||
'class' => 'icon-link',
|
||||
])
|
||||
->setExtra('icon', 'user')
|
||||
->setExtra('icon_only', false)
|
||||
;
|
||||
|
||||
$this->addLogoutItem($menu, true);
|
||||
|
||||
return $menu;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user