mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Changed name of PersonMenuBuilder
More general name since it also contains the AccompanyingPeriod task menu entry now.
This commit is contained in:
parent
01ae50aca7
commit
17b6f287dc
@ -28,7 +28,7 @@ use Symfony\Component\Translation\TranslatorInterface;
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
*/
|
||||
class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
class MenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
/**
|
||||
*
|
||||
@ -86,12 +86,10 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
|
||||
public function buildAccompanyingCourseMenu($menu, $parameters){
|
||||
|
||||
//var $person \Chill\PersonBundle\Entity\Person */
|
||||
$course = $parameters['accompanyingCourse'];
|
||||
|
||||
//TODO: implement voter again?
|
||||
|
||||
// if ($this->authorizationChecker->isGranted(TaskVoter::SHOW, $course)) {
|
||||
if ($this->authorizationChecker->isGranted(TaskVoter::SHOW, $course)) {
|
||||
$menu->addChild(
|
||||
$this->translator->trans('Tasks'), [
|
||||
'route' => 'chill_task_singletask_courselist',
|
||||
@ -99,7 +97,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
[ 'course_id' => $course->getId() ]
|
||||
])
|
||||
->setExtra('order', 400);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
|
@ -1,23 +1,23 @@
|
||||
services:
|
||||
Chill\TaskBundle\Menu\UserMenuBuilder:
|
||||
arguments:
|
||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||
$counter: '@Chill\TaskBundle\Templating\UI\CountNotificationTask'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
tags:
|
||||
- { name: 'chill.menu_builder' }
|
||||
|
||||
Chill\TaskBundle\Menu\PersonMenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: 'chill.menu_builder' }
|
||||
|
||||
Chill\TaskBundle\Menu\SectionMenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: 'chill.menu_builder' }
|
||||
Chill\TaskBundle\Menu\UserMenuBuilder:
|
||||
arguments:
|
||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||
$counter: '@Chill\TaskBundle\Templating\UI\CountNotificationTask'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
tags:
|
||||
- { name: "chill.menu_builder" }
|
||||
|
||||
Chill\TaskBundle\Menu\MenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: "chill.menu_builder" }
|
||||
|
||||
Chill\TaskBundle\Menu\SectionMenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: "chill.menu_builder" }
|
||||
|
Loading…
x
Reference in New Issue
Block a user