mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	Merge branch 'features/household-context' into 'master'
Create an household context See merge request Chill-Projet/chill-bundles!74
This commit is contained in:
		| @@ -0,0 +1,88 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Chill\PersonBundle\Controller; | ||||
|  | ||||
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
| use Symfony\Component\Routing\Annotation\Route; | ||||
| use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | ||||
| use Chill\PersonBundle\Entity\Household\Household; | ||||
|  | ||||
| /** | ||||
|  * @Route("/{_locale}/person/household") | ||||
|  */ | ||||
| class HouseholdController extends AbstractController | ||||
| { | ||||
|     /** | ||||
|      * @Route( | ||||
|      *      "/{household_id}/summary", | ||||
|      *      name="chill_person_household_summary", | ||||
|      *      methods={"GET", "HEAD"} | ||||
|      *  ) | ||||
|      *  @ParamConverter("household", options={"id" = "household_id"}) | ||||
|      */ | ||||
|     public function summary(Request $request, Household $household) | ||||
|     { | ||||
|         // TODO ACL | ||||
|         return $this->render('@ChillPerson/Household/summary.html.twig', | ||||
|             [ | ||||
|                 'household' => $household | ||||
|             ] | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route( | ||||
|      *      "/{household_id}/members", | ||||
|      *      name="chill_person_household_members", | ||||
|      *      methods={"GET", "HEAD"} | ||||
|      *  ) | ||||
|      *  @ParamConverter("household", options={"id" = "household_id"}) | ||||
|      */ | ||||
|     public function members(Request $request, Household $household) | ||||
|     { | ||||
|         // TODO ACL | ||||
|         return $this->render('@ChillPerson/Household/members.html.twig', | ||||
|             [ | ||||
|                 'household' => $household | ||||
|             ] | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route( | ||||
|      *      "/{household_id}/addresses", | ||||
|      *      name="chill_person_household_addresses", | ||||
|      *      methods={"GET", "HEAD"} | ||||
|      *  ) | ||||
|      *  @ParamConverter("household", options={"id" = "household_id"}) | ||||
|      */ | ||||
|     public function addresses(Request $request, Household $household) | ||||
|     { | ||||
|         // TODO ACL | ||||
|         return $this->render('@ChillPerson/Household/addresses.html.twig', | ||||
|             [ | ||||
|                 'household' => $household | ||||
|             ] | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route( | ||||
|      *      "/{household_id}/address/move", | ||||
|      *      name="chill_person_household_address_move", | ||||
|      *      methods={"GET", "HEAD", "POST"} | ||||
|      *  ) | ||||
|      *  @ParamConverter("household", options={"id" = "household_id"}) | ||||
|      */ | ||||
|     public function addressMove(Request $request, Household $household) | ||||
|     { | ||||
|         // TODO ACL | ||||
|         return $this->render('@ChillPerson/Household/address_move.html.twig', | ||||
|             [ | ||||
|                 'household' => $household | ||||
|             ] | ||||
|         ); | ||||
|     } | ||||
| } | ||||
| @@ -9,6 +9,7 @@ use Symfony\Component\Serializer\Exception; | ||||
| use Symfony\Component\Routing\Annotation\Route; | ||||
| use Chill\MainBundle\CRUD\Controller\ApiController; | ||||
| use Chill\PersonBundle\Household\MembersEditor; | ||||
| use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; | ||||
|  | ||||
| class HouseholdMemberController extends ApiController | ||||
| { | ||||
| @@ -27,24 +28,20 @@ class HouseholdMemberController extends ApiController | ||||
|         } catch (Exception\InvalidArgumentException | Exception\UnexpectedValueException $e) { | ||||
|             throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e); | ||||
|         } | ||||
|         dump($editor); | ||||
|  | ||||
|         // TODO ACL | ||||
|         // | ||||
|         // TODO validation | ||||
|         // | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         // to ensure closing membership before creating one, we must manually open a transaction | ||||
|         $em->beginTransaction(); | ||||
|  | ||||
|         foreach ($editor->getPersistable() as $el) { | ||||
|            $em->persist($el);  | ||||
|         } | ||||
|  | ||||
|         $em->flush(); | ||||
|         $em->commit(); | ||||
|  | ||||
|  | ||||
|         return $this->json($editor->getHousehold(), Response::HTTP_OK, ["groups" => ["read"]]); | ||||
|          | ||||
|         return $this->json($editor->getHousehold(), Response::HTTP_OK, [], [ | ||||
|             "groups" => ["read"], | ||||
|         ]); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -2,10 +2,12 @@ | ||||
|  | ||||
| namespace Chill\PersonBundle\Entity\Household; | ||||
|  | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use Doctrine\Common\Collections\Collection; | ||||
| use Chill\MainBundle\Entity\Address; | ||||
| use Symfony\Component\Serializer\Annotation as Serializer; | ||||
| use Chill\MainBundle\Entity\Address; | ||||
| use Chill\PersonBundle\Entity\Household\HouseholdMember; | ||||
|  | ||||
| /** | ||||
|  * @ORM\Entity | ||||
| @@ -24,16 +26,10 @@ class Household | ||||
|      * @ORM\Column(type="integer") | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private $id; | ||||
|  | ||||
|     public function getId(): ?int | ||||
|     { | ||||
|         return $this->id; | ||||
|     } | ||||
|     private ?int $id = null; | ||||
|  | ||||
|     /** | ||||
|      * Addresses | ||||
|      * @var Collection | ||||
|      * | ||||
|      * @ORM\ManyToMany( | ||||
|      *     targetEntity="Chill\MainBundle\Entity\Address", | ||||
| @@ -41,8 +37,27 @@ class Household | ||||
|      * @ORM\JoinTable(name="chill_person_household_to_addresses") | ||||
|      * @ORM\OrderBy({"validFrom" = "DESC"}) | ||||
|      */ | ||||
|     private $addresses; | ||||
|     private Collection $addresses; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\OneToMany( | ||||
|      *      targetEntity=HouseholdMember::class, | ||||
|      *      mappedBy="household" | ||||
|      *  ) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private Collection $members; | ||||
|  | ||||
|     public function __construct() | ||||
|     { | ||||
|         $this->addresses = new ArrayCollection(); | ||||
|         $this->members = new ArrayCollection(); | ||||
|     } | ||||
|  | ||||
|     public function getId(): ?int | ||||
|     { | ||||
|         return $this->id; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param Address $address | ||||
| @@ -74,4 +89,34 @@ class Household | ||||
|         return $this->addresses; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @return Collection|HouseholdMember[] | ||||
|      */ | ||||
|     public function getMembers(): Collection | ||||
|     { | ||||
|         return $this->members; | ||||
|     } | ||||
|  | ||||
|     public function addMember(HouseholdMember $member): self | ||||
|     { | ||||
|         if (!$this->members->contains($member)) { | ||||
|             $this->members[] = $member; | ||||
|             $member->setHousehold($this); | ||||
|         } | ||||
|  | ||||
|         return $this; | ||||
|     } | ||||
|  | ||||
|     public function removeMember(HouseholdMember $member): self | ||||
|     { | ||||
|         if ($this->members->removeElement($member)) { | ||||
|             // set the owning side to null (unless already changed) | ||||
|             if ($member->getHousehold() === $this) { | ||||
|                 $member->setHousehold(null); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         return $this; | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -6,6 +6,7 @@ use Doctrine\ORM\Mapping as ORM; | ||||
| use Chill\PersonBundle\Entity\Person; | ||||
| use Chill\PersonBundle\Entity\Household\Household; | ||||
| use Chill\PersonBundle\Entity\Household\Position; | ||||
| use Symfony\Component\Serializer\Annotation as Serializer; | ||||
|  | ||||
|  | ||||
| /** | ||||
| @@ -20,26 +21,31 @@ class HouseholdMember | ||||
|      * @ORM\Id | ||||
|      * @ORM\GeneratedValue | ||||
|      * @ORM\Column(type="integer") | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private $id; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\ManyToOne(targetEntity=Position::class) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private ?Position $position = null; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private ?\DateTimeImmutable $startDate = null; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="date_immutable", nullable= true, options={"default": null}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private ?\DateTimeImmutable $endDate = null; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="string", length=255, nullable=true) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private ?string $comment = NULL; | ||||
|  | ||||
| @@ -50,6 +56,7 @@ class HouseholdMember | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="boolean", options={"default": false}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private bool $holder = false; | ||||
|  | ||||
| @@ -59,6 +66,7 @@ class HouseholdMember | ||||
|      * @ORM\ManyToOne( | ||||
|      *  targetEntity="\Chill\PersonBundle\Entity\Person" | ||||
|      * ) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private ?Person $person = null; | ||||
|  | ||||
| @@ -131,6 +139,9 @@ class HouseholdMember | ||||
|         return $this; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     public function getShareHousehold(): ?bool | ||||
|     { | ||||
|         return $this->sharedHousehold; | ||||
|   | ||||
							
								
								
									
										56
									
								
								src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Chill\PersonBundle\Menu; | ||||
|  | ||||
| use Chill\MainBundle\Routing\LocalMenuBuilderInterface; | ||||
| use Chill\PersonBundle\Entity\Household\Household; | ||||
| use Knp\Menu\MenuItem; | ||||
| use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  | ||||
| class HouseholdMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|      | ||||
|     /** | ||||
|      * @var TranslatorInterface | ||||
|      */ | ||||
|     protected $translator; | ||||
|      | ||||
|     public function __construct(TranslatorInterface $translator) | ||||
|     { | ||||
|         $this->translator = $translator; | ||||
|     } | ||||
|      | ||||
|     public static function getMenuIds(): array | ||||
|     { | ||||
|         return [ 'household' ]; | ||||
|     } | ||||
|      | ||||
|     public function buildMenu($menuId, MenuItem $menu, array $parameters): void | ||||
|     { | ||||
|         $household = $parameters['household']; | ||||
|  | ||||
|         $menu->addChild($this->translator->trans('Summary'), [ | ||||
|             'route' => 'chill_person_household_summary', | ||||
|             'routeParameters' => [ | ||||
|                 'household_id' => $household->getId() | ||||
|         ]]) | ||||
|         ->setExtras(['order' => 10]); | ||||
|  | ||||
|         $menu->addChild($this->translator->trans('Members'), [ | ||||
|             'route' => 'chill_person_household_members', | ||||
|             'routeParameters' => [ | ||||
|                 'household_id' => $household->getId() | ||||
|         ]]) | ||||
|         ->setExtras(['order' => 20]); | ||||
|          | ||||
|         $menu->addChild($this->translator->trans('Addresses'), [ | ||||
|             'route' => 'chill_person_household_addresses', | ||||
|             'routeParameters' => [ | ||||
|                 'household_id' => $household->getId() | ||||
|         ]]) | ||||
|         ->setExtras(['order' => 30]); | ||||
|          | ||||
|     } | ||||
|      | ||||
|      | ||||
| } | ||||
| @@ -0,0 +1,11 @@ | ||||
| {% extends '@ChillPerson/Household/layout.html.twig' %} | ||||
|  | ||||
| {% block title 'Move household'|trans %} | ||||
|  | ||||
| {% block content %} | ||||
| <h1>{{ block('title') }}</h1> | ||||
|  | ||||
| <p>Household with id {{ household.id }}</p> | ||||
|  | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -0,0 +1,15 @@ | ||||
| {% extends '@ChillPerson/Household/layout.html.twig' %} | ||||
|  | ||||
| {% block title 'Addresses history for household'|trans %} | ||||
|  | ||||
| {% block content %} | ||||
| <h1>{{ block('title') }}</h1> | ||||
|  | ||||
| <p>Household with id {{ household.id }}</p> | ||||
|  | ||||
| <a class="sc-button bt-update"  | ||||
|   href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}"> | ||||
|   {{ 'Move household'|trans }} | ||||
| </a> | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -0,0 +1,26 @@ | ||||
| <div class="subheader"> | ||||
|     <div class="grid-12 parent" id="header-accompanying_course-name" > | ||||
|         <div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent"> | ||||
|  | ||||
|             <div class="grid-6">{% set title = title %} | ||||
|                 <h1> | ||||
|                     <i class="fa fa-child"></i> | ||||
|                     {{ 'Household'|trans }} | ||||
|                     <span style="font-weight: lighter; font-size: 50%;">(n°{{ household.id  }})</span> | ||||
|                 </h1> | ||||
|             </div> | ||||
|  | ||||
|             <div class="grid-3" id="banner-flags"></div> | ||||
|  | ||||
|             <div class="grid-3" id="banner-status"></div> | ||||
|  | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class="grid-12 parent" id="header-accompanying_course-details" > | ||||
|         <div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent"> | ||||
|  | ||||
|             <div id="banner-misc"></div> | ||||
|  | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| @@ -0,0 +1,17 @@ | ||||
| {% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %} | ||||
|  | ||||
| {% block top_banner %} | ||||
|     {{ include('@ChillPerson/Household/banner.html.twig', { title: block('title') }) }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block layout_wvm_content %} | ||||
|     {% block content %}{% endblock %} | ||||
| {% endblock  %} | ||||
|  | ||||
| {% block vertical_menu_content %} | ||||
|     {{ chill_menu('household', { | ||||
|         'layout': '@ChillPerson/Household/menu.html.twig', | ||||
|         'args' : { 'household': household } | ||||
|     }) }} | ||||
| {% endblock %} | ||||
|  | ||||
| @@ -0,0 +1,10 @@ | ||||
| {% extends '@ChillPerson/Household/layout.html.twig' %} | ||||
|  | ||||
| {% block title 'Household members'|trans %} | ||||
|  | ||||
| {% block content %} | ||||
| <h1>{{ block('title') }}</h1> | ||||
|  | ||||
| <p>Household with id {{ household.id }}</p> | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -0,0 +1,7 @@ | ||||
| <ul class="tab-nav"> | ||||
|     {% for menu in menus %} | ||||
|         <li class=""> | ||||
|             <a href="{{ menu.uri }}" >{{ menu.label|upper }}</a> | ||||
|         </li> | ||||
|     {% endfor %} | ||||
| </ul> | ||||
| @@ -0,0 +1,14 @@ | ||||
| {% extends '@ChillPerson/Household/layout.html.twig' %} | ||||
|  | ||||
| {% block title 'Household summary'|trans %} | ||||
|  | ||||
| {% block content %} | ||||
| <h1>{{ block('title') }}</h1> | ||||
|  | ||||
| <p>Household with id {{ household.id }}</p> | ||||
|  | ||||
| <h2>{{ 'Actual household members'|trans }}</h2> | ||||
|  | ||||
| <p>TODO</p> | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -0,0 +1,97 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Chill\PersonBundle\Tests\Controller; | ||||
|  | ||||
| use Chill\PersonBundle\Entity\Household\Household; | ||||
| use Doctrine\ORM\EntityManagerInterface; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Chill\MainBundle\Test\PrepareClientTrait; | ||||
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||||
| use Symfony\Bundle\FrameworkBundle\KernelBrowser; | ||||
|  | ||||
| class HouseholdControllerTest extends WebTestCase | ||||
| { | ||||
|     use PrepareClientTrait; | ||||
|  | ||||
|     private ?KernelBrowser $client = null; | ||||
|  | ||||
|     protected function setUp() | ||||
|     { | ||||
|         $this->client = $this->getClientAuthenticated(); | ||||
|     }  | ||||
|  | ||||
|     /** | ||||
|      * @dataProvider generateValidHouseholdIds | ||||
|      */ | ||||
|     public function testSummary($householdId) | ||||
|     { | ||||
|         $this->client->request( | ||||
|             Request::METHOD_GET, | ||||
|             "/fr/person/household/{$householdId}/summary" | ||||
|         ); | ||||
|  | ||||
|         $this->assertResponseIsSuccessful(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @dataProvider generateValidHouseholdIds | ||||
|      */ | ||||
|     public function testMembers($householdId) | ||||
|     { | ||||
|         $this->client->request( | ||||
|             Request::METHOD_GET, | ||||
|             "/fr/person/household/{$householdId}/members" | ||||
|         ); | ||||
|  | ||||
|         $this->assertResponseIsSuccessful(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @dataProvider generateValidHouseholdIds | ||||
|      */ | ||||
|     public function testAddresses($householdId) | ||||
|     { | ||||
|         $this->client->request( | ||||
|             Request::METHOD_GET, | ||||
|             "/fr/person/household/{$householdId}/addresses" | ||||
|         ); | ||||
|  | ||||
|         $this->assertResponseIsSuccessful(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @dataProvider generateValidHouseholdIds | ||||
|      */ | ||||
|     public function testAddressMove($householdId) | ||||
|     { | ||||
|         $this->client->request( | ||||
|             Request::METHOD_GET, | ||||
|             "/fr/person/household/{$householdId}/address/move" | ||||
|         ); | ||||
|  | ||||
|         $this->assertResponseIsSuccessful(); | ||||
|  | ||||
|         // ici, il faudrait tester la requête POST | ||||
|     } | ||||
|  | ||||
|     public function generateValidHouseholdIds() | ||||
|     { | ||||
|         self::bootKernel(); | ||||
|         $em = self::$container->get(EntityManagerInterface::class); | ||||
|  | ||||
|         $ids = $em->createQuery("SELECT DISTINCT h.id FROM ".Household::class." h ". | ||||
|             "JOIN h.members m ". | ||||
|             "JOIN m.person p ". | ||||
|             "JOIN p.center c ". | ||||
|             "WHERE c.name = :center" | ||||
|         ) | ||||
|             ->setParameter('center', "Center A") | ||||
|             ->setMaxResults(100) | ||||
|             ->getScalarResult() | ||||
|             ; | ||||
|  | ||||
|         \shuffle($ids); | ||||
|  | ||||
|         yield [ \array_pop($ids)['id'] ];  | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,48 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Chill\PersonBundle\Tests\Serializer\Normalizer; | ||||
|  | ||||
| use Chill\PersonBundle\Entity\Household\Position; | ||||
| use Chill\PersonBundle\Entity\Household\Household; | ||||
| use Chill\PersonBundle\Entity\Household\HouseholdMember; | ||||
| use Chill\PersonBundle\Entity\Person; | ||||
| use Symfony\Component\Serializer\Normalizer\NormalizerInterface; | ||||
| use Symfony\Component\Serializer\SerializerInterface; | ||||
| use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||||
|  | ||||
|  | ||||
| class HouseholdNormalizerTest extends KernelTestCase | ||||
| { | ||||
|     private ?NormalizerInterface $normalizer; | ||||
|  | ||||
|     protected function setUp() | ||||
|     { | ||||
|         self::bootKernel(); | ||||
|         $this->normalizer= self::$container->get(NormalizerInterface::class); | ||||
|     } | ||||
|  | ||||
|     public function testNormalizationRecursive() | ||||
|     { | ||||
|         $person = new Person(); | ||||
|         $member = new HouseholdMember(); | ||||
|         $household = new Household(); | ||||
|         $position = (new Position()) | ||||
|             ->setShareHousehold(true) | ||||
|             ->setAllowHolder(true) | ||||
|             ; | ||||
|  | ||||
|         $member->setPerson($person) | ||||
|             ->setStartDate(new \DateTimeImmutable('1 year ago')) | ||||
|             ->setEndDate(new \DateTimeImmutable('1 month ago')); | ||||
|  | ||||
|         $household->addMember($member); | ||||
|  | ||||
|         $normalized = $this->normalizer->normalize($household, | ||||
|             'json', [ 'groups' => [ 'read' ]]); | ||||
|  | ||||
|         $this->assertIsArray($normalized); | ||||
|         $this->assertArrayHasKey('type', $normalized); | ||||
|         $this->assertEquals('household', $normalized['type']); | ||||
|     } | ||||
|      | ||||
| } | ||||
| @@ -1,17 +1,23 @@ | ||||
| services: | ||||
|     Chill\PersonBundle\Menu\SectionMenuBuilder: | ||||
|         arguments: | ||||
|             $authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface' | ||||
|             $translator: '@Symfony\Component\Translation\TranslatorInterface' | ||||
|         tags: | ||||
|             - { name: 'chill.menu_builder' } | ||||
|  | ||||
|     Chill\PersonBundle\Menu\AdminMenuBuilder: | ||||
|         arguments: | ||||
|             $authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface' | ||||
|     Chill\PersonBundle\Menu\: | ||||
|         resource: './../../Menu' | ||||
|         autowire: true | ||||
|         tags: | ||||
|             - { name: 'chill.menu_builder' } | ||||
|  | ||||
|               #    Chill\PersonBundle\Menu\SectionMenuBuilder: | ||||
|               #        arguments: | ||||
|               #            $authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface' | ||||
|               #            $translator: '@Symfony\Component\Translation\TranslatorInterface' | ||||
|               #        tags: | ||||
|               #            - { name: 'chill.menu_builder' } | ||||
|               # | ||||
|               #    Chill\PersonBundle\Menu\AdminMenuBuilder: | ||||
|               #        arguments: | ||||
|               #            $authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface' | ||||
|               #        tags: | ||||
|               #            - { name: 'chill.menu_builder' } | ||||
|               # | ||||
|     Chill\PersonBundle\Menu\PersonMenuBuilder: | ||||
|         arguments: | ||||
|             $showAccompanyingPeriod: '%chill_person.accompanying_period%' | ||||
| @@ -19,8 +25,8 @@ services: | ||||
|         tags: | ||||
|             - { name: 'chill.menu_builder' } | ||||
|  | ||||
|     Chill\PersonBundle\Menu\AccompanyingCourseMenuBuilder: | ||||
|         arguments: | ||||
|             $translator: '@Symfony\Contracts\Translation\TranslatorInterface' | ||||
|         tags: | ||||
|             - { name: 'chill.menu_builder' } | ||||
|               #    Chill\PersonBundle\Menu\AccompanyingCourseMenuBuilder: | ||||
|               #        arguments: | ||||
|               #            $translator: '@Symfony\Contracts\Translation\TranslatorInterface' | ||||
|               #        tags: | ||||
|               #            - { name: 'chill.menu_builder' } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user