+ }
+
+ //Add multi map
+ $this->context['multimap'] = $this->map->getMultiMap($this->translator->trans('Libre Air locations sector map'), $this->modified->getTimestamp(), $this->context['locations']);
+
+ //Set title
+ $this->context['title']['page'] = $this->translator->trans('Libre Air locations');
+
+ //Set description
+ $this->context['description'] = $this->translator->trans('Libre Air location list');
+
+ //Set keywords
+ $this->context['keywords'] = [
+ $this->translator->trans('locations'),
+ $this->translator->trans('location list'),
+ $this->translator->trans('listing'),
+ $this->translator->trans('Libre Air')
+ ];
+
+ //Create location forms for role_admin
+ if ($this->checker->isGranted('ROLE_ADMIN')) {
+ //Fetch all locations
+ $locations = $this->doctrine->getRepository(Location::class)->findAll();
+
+ //Init locations to context
+ $this->context['forms']['locations'] = [];
+
+ //Iterate on locations
+ foreach($this->context['locations'] as $id => $location) {
+ //Create LocationType form
+ $form = $this->factory->createNamed(
+ //Set form id
+ 'locations_'.$id,
+ //Set form type
+ 'Rapsys\AirBundle\Form\LocationType',
+ //Set form data
+ $locations[$location['id']],
+ //Set the form attributes
+ ['attr' => []]
+ );
+
+ //Refill the fields in case of invalid form
+ $form->handleRequest($request);
+
+ //Handle valid form
+ if ($form->isSubmitted() && $form->isValid()) {
+ //Get data
+ $data = $form->getData();
+
+ //Set updated
+ $data->setUpdated(new \DateTime('now'));
+
+ //Queue location save
+ $this->manager->persist($data);
+
+ //Flush to get the ids
+ $this->manager->flush();
+
+ //Add notice
+ $this->addFlash('notice', $this->translator->trans('Location %id% updated', ['%id%' => $location['id']]));
+
+ //Redirect to cleanup the form
+ return $this->redirectToRoute('rapsys_air_location', ['location' => $location['id']]);
+ }
+
+ //Add form to context
+ $this->context['forms']['locations'][$id] = $form->createView();