mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 01:09:41 +00:00 
			
		
		
		
	Optimized menu
This commit is contained in:
		| @@ -44,21 +44,27 @@ class UserMenuSubscriber implements EventSubscriberInterface | ||||
|             ] | ||||
|         ]); | ||||
|          | ||||
|         $dropdown = $menu->addChild('user', [ | ||||
|         $dropdown = $menu->addChild($this->tokenStorage->getToken() | ||||
|             ->getUsername() ?? 'user', [ | ||||
|             'attributes' => [ | ||||
|                 'dropdown' => true, | ||||
|                 'icon' => 'fas fa-user' | ||||
|             ] | ||||
|         ]); | ||||
|         /** | ||||
|          * @todo replace the following check trough fos bundle | ||||
|          */ | ||||
|         if ($this->tokenStorage->getToken()->getRoles()) { | ||||
|              | ||||
|             $dropdown->addChild('logout', [ | ||||
|                 'route' => 'logout', | ||||
|                 'attributes' => [ | ||||
|                     'icon' => 'fas fa-sign-out-alt', | ||||
|                     'divider_append' => true, | ||||
|                     'divider_append' => true | ||||
|                 ] | ||||
|             ]); | ||||
|             $dropdown->addChild('edit profile', [ | ||||
|                 'route' => 'fos_user_profile_edit', | ||||
|                 'attributes' => [ | ||||
|                     'icon' => 'fas fa-user-edit', | ||||
|                     'divider_append' => true | ||||
|                 ] | ||||
|             ]); | ||||
|         } else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user