You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
401 B
PHP
34 lines
401 B
PHP
<?php
|
|
|
|
namespace App\Service;
|
|
|
|
use App\Entity\User;
|
|
|
|
Class Menus
|
|
{
|
|
public function getMenus(User $user)
|
|
{
|
|
|
|
|
|
$menus = array(
|
|
array(
|
|
"route" => "app_logout",
|
|
"title" => "log out"
|
|
),
|
|
);
|
|
|
|
|
|
if( $user->isGranted('SUPER_ADMIN') )
|
|
{
|
|
$menus[] = array(
|
|
"route" => "users",
|
|
"title" => "Users"
|
|
);
|
|
}
|
|
|
|
|
|
|
|
return $menus;
|
|
}
|
|
|
|
} |