mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,25 +1,16 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2018 Champs Libres Cooperative <info@champs-libres.coop>
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Routing\MenuBuilder;
|
||||
|
||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
@@ -36,7 +27,6 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
$user = $this->security->getUser();
|
||||
|
||||
if ($user instanceof User) {
|
||||
|
||||
if (null !== $user->getCurrentLocation()) {
|
||||
$locationTextMenu = $user->getCurrentLocation()->getName();
|
||||
} else {
|
||||
@@ -50,7 +40,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
)
|
||||
->setExtras([
|
||||
'order' => -9999999,
|
||||
'icon' => 'map-marker'
|
||||
'icon' => 'map-marker',
|
||||
]);
|
||||
$menu
|
||||
->addChild(
|
||||
@@ -58,7 +48,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
['route' => 'change_my_password']
|
||||
)
|
||||
->setExtras([
|
||||
'order' => 99999999998
|
||||
'order' => 99999999998,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -66,17 +56,17 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
->addChild(
|
||||
'Logout',
|
||||
[
|
||||
'route' => 'logout'
|
||||
'route' => 'logout',
|
||||
]
|
||||
)
|
||||
->setExtras([
|
||||
'order' => 99999999999,
|
||||
'icon' => 'power-off'
|
||||
'icon' => 'power-off',
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
{
|
||||
return [ 'user' ];
|
||||
return ['user'];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user