//Create ApplicationType form
$application = $this->factory->create('Rapsys\AirBundle\Form\ApplicationType', null, [
//Set the action
- 'action' => $this->generateUrl('rapsys_air_application_add'),
+ 'action' => $this->generateUrl('rapsysair_application_add'),
//Set the form attribute
'attr' => [ 'class' => 'col' ],
//Set dance choices
//With empty locations link
if (empty($parameters['locations_link'])) {
//Set locations link
- $parameters['locations_link'] = $this->router->generate('rapsys_air_location');
+ $parameters['locations_link'] = $this->router->generate('rapsysair_location');
}
//With empty locations title
//Create the form according to the FormType created previously.
//And give the proper parameters
$form = $this->createForm('Rapsys\AirBundle\Form\CalendarType', ['calendar' => $this->config['calendar']['calendar'], 'prefix' => $this->config['calendar']['prefix']], [
- 'action' => $this->generateUrl('rapsys_air_calendar'),
+ 'action' => $this->generateUrl('rapsysair_calendar'),
'method' => 'POST'
]);
'application_name' => $data['project'],
'client_id' => $data['client'],
'client_secret' => $data['secret'],
- 'redirect_uri' => $redirect = $this->generateUrl('rapsys_air_calendar_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
+ 'redirect_uri' => $redirect = $this->generateUrl('rapsysair_calendar_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
'scopes' => [Calendar::CALENDAR, Calendar::CALENDAR_EVENTS],
'access_type' => 'offline',
'approval_prompt' => 'force'
# $googleClient->addScope(Calendar::CALENDAR_EVENTS);
#
# //Set redirect uri
-# $googleClient->setRedirectUri($redirect = $this->generateUrl('rapsys_air_calendar_callback', [], UrlGeneratorInterface::ABSOLUTE_URL));
+# $googleClient->setRedirectUri($redirect = $this->generateUrl('rapsysair_calendar_callback', [], UrlGeneratorInterface::ABSOLUTE_URL));
#
# //Set offline access
# $googleClient->setAccessType('offline');
$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']]);
+ return $this->redirectToRoute('rapsysair_location', ['location' => $location['id']]);
}
//Add form to context
$this->addFlash('notice', $this->translator->trans('Location created'));
//Redirect to cleanup the form
- return $this->redirectToRoute('rapsys_air_location', ['location' => $data->getId()]);
+ return $this->redirectToRoute('rapsysair_location', ['location' => $data->getId()]);
}
//Add form to context
//With invalid slug
if ($location !== $this->context['location']['slug']) {
//Redirect on correctly spelled location
- return $this->redirectToRoute('rapsys_air_location_view', ['id' => $this->context['location']['id'], 'location' => $this->context['location']['slug']], Response::HTTP_MOVED_PERMANENTLY);
+ return $this->redirectToRoute('rapsysair_location_view', ['id' => $this->context['location']['id'], 'location' => $this->context['location']['slug']], Response::HTTP_MOVED_PERMANENTLY);
}
//Fetch calendar
//Set modified
//XXX: dance modified is already computed inside calendar modified
- $this->modified = max(array_merge([$this->context['location']['updated']], array_map(function ($v) { return $v['modified']; }, array_merge($this->context['calendar'], $this->context['locations']))));
+ $this->modified = max(array_merge([$this->context['location']['modified']], array_map(function ($v) { return $v['modified']; }, array_merge($this->context['calendar'], $this->context['locations']))));
//Create response
$response = new Response();
'status' => in_array('canceled', $session['class'])?'annulé':'confirmé',
'modified' => $session['modified']->format(\DateTime::ISO8601),
#'organizer' => $session['application']['user']['title'],
- #'source' => $this->router->generate('rapsys_air_session_view', ['id' => $sessionId, 'location' => $this->translator->trans($session['l_title'])], UrlGeneratorInterface::ABSOLUTE_URL)
+ #'source' => $this->router->generate('rapsysair_session_view', ['id' => $sessionId, 'location' => $this->translator->trans($session['l_title'])], UrlGeneratorInterface::ABSOLUTE_URL)
'source' => $this->router->generate($route, $routeParams, UrlGeneratorInterface::ABSOLUTE_URL)
];
}
//TODO: move to named form ???
$sessionForm = $this->factory->create('Rapsys\AirBundle\Form\SessionType', null, [
//Set the action
- 'action' => $this->generateUrl('rapsys_air_session_view', ['id' => $id, 'location' => $this->context['session']['location']['slug'], 'dance' => $this->context['session']['application']['dance']['slug']??null, 'user' => $this->context['session']['application']['user']['slug']??null]),
+ 'action' => $this->generateUrl('rapsysair_session_view', ['id' => $id, 'location' => $this->context['session']['location']['slug'], 'dance' => $this->context['session']['application']['dance']['slug']??null, 'user' => $this->context['session']['application']['user']['slug']??null]),
//Set the form attribute
'attr' => [ 'class' => 'col' ],
//Set admin
$this->manager->flush();
//Redirect to cleanup the form
- return $this->redirectToRoute('rapsys_air_session_view', ['id' => $id, 'location' => $this->context['session']['location']['slug'], 'dance' => $this->context['session']['application']['dance']['slug']??null, 'user' => $this->context['session']['application']['user']['slug']??null]);
+ return $this->redirectToRoute('rapsysair_session_view', ['id' => $id, 'location' => $this->context['session']['location']['slug'], 'dance' => $this->context['session']['application']['dance']['slug']??null, 'user' => $this->context['session']['application']['user']['slug']??null]);
}
//Add form to context