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
6e3ce06fcf
commit
34dd35f2e2
@ -28,7 +28,7 @@ use Symfony\Component\Translation\TranslatorInterface;
|
|||||||
*
|
*
|
||||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
* @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){
|
public function buildAccompanyingCourseMenu($menu, $parameters){
|
||||||
|
|
||||||
//var $person \Chill\PersonBundle\Entity\Person */
|
|
||||||
$course = $parameters['accompanyingCourse'];
|
$course = $parameters['accompanyingCourse'];
|
||||||
|
|
||||||
//TODO: implement voter again?
|
|
||||||
|
|
||||||
// if ($this->authorizationChecker->isGranted(TaskVoter::SHOW, $course)) {
|
if ($this->authorizationChecker->isGranted(TaskVoter::SHOW, $course)) {
|
||||||
$menu->addChild(
|
$menu->addChild(
|
||||||
$this->translator->trans('Tasks'), [
|
$this->translator->trans('Tasks'), [
|
||||||
'route' => 'chill_task_singletask_courselist',
|
'route' => 'chill_task_singletask_courselist',
|
||||||
@ -99,7 +97,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
[ 'course_id' => $course->getId() ]
|
[ 'course_id' => $course->getId() ]
|
||||||
])
|
])
|
||||||
->setExtra('order', 400);
|
->setExtra('order', 400);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getMenuIds(): array
|
public static function getMenuIds(): array
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
services:
|
services:
|
||||||
Chill\TaskBundle\Menu\UserMenuBuilder:
|
Chill\TaskBundle\Menu\UserMenuBuilder:
|
||||||
arguments:
|
arguments:
|
||||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||||
$counter: '@Chill\TaskBundle\Templating\UI\CountNotificationTask'
|
$counter: '@Chill\TaskBundle\Templating\UI\CountNotificationTask'
|
||||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||||
tags:
|
tags:
|
||||||
- { name: 'chill.menu_builder' }
|
- { name: "chill.menu_builder" }
|
||||||
|
|
||||||
Chill\TaskBundle\Menu\PersonMenuBuilder:
|
Chill\TaskBundle\Menu\MenuBuilder:
|
||||||
arguments:
|
arguments:
|
||||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||||
tags:
|
tags:
|
||||||
- { name: 'chill.menu_builder' }
|
- { name: "chill.menu_builder" }
|
||||||
|
|
||||||
Chill\TaskBundle\Menu\SectionMenuBuilder:
|
Chill\TaskBundle\Menu\SectionMenuBuilder:
|
||||||
arguments:
|
arguments:
|
||||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||||
tags:
|
tags:
|
||||||
- { name: 'chill.menu_builder' }
|
- { name: "chill.menu_builder" }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user