}
//With logged user
- if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
+ if ($this->checker->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
//Set last modified
$response->setLastModified(new \DateTime('-1 year'));
}
//Set section
- $this->context['title'] = $this->translator->trans('Libre Air cities');
+ $this->context['title']['page'] = $this->translator->trans('Libre Air cities');
//Set description
$this->context['description'] = $this->translator->trans('Libre Air city list');
}
//Add calendar
- $this->context['calendar'] = $this->doctrine->getRepository(Session::class)->findAllByPeriodAsCalendarArray($this->period, !$this->isGranted('IS_AUTHENTICATED_REMEMBERED'), floatval($latitude), floatval($longitude));
+ $this->context['calendar'] = $this->doctrine->getRepository(Session::class)->findAllByPeriodAsCalendarArray($this->period, !$this->checker->isGranted('IS_AUTHENTICATED_REMEMBERED'), floatval($latitude), floatval($longitude));
//Set dances
$this->context['dances'] = [];
$response = new Response();
//With logged user
- if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
+ if ($this->checker->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
//Set last modified
$response->setLastModified(new \DateTime('-1 year'));
$dances = implode($this->translator->trans(' and '), array_filter(array_merge([implode(', ', array_slice($dances, 0, -1))], array_slice($dances, -1)), 'strlen'));
//Set title
- $this->context['title'] = $this->translator->trans('%dances% %city%', ['%dances%' => $dances, '%city%' => $this->context['city']['in']]);
+ $this->context['title']['page'] = $this->translator->trans('%dances% %city%', ['%dances%' => $dances, '%city%' => $this->context['city']['in']]);
//Set description
$this->context['description'] = $this->translator->trans('%dances% indoor and outdoor calendar %city%', ['%dances%' => $dances, '%city%' => $this->context['city']['in']]);
} else {
//Set title
- $this->context['title'] = $this->translator->trans('Dance %city%', ['%city%' => $this->context['city']['in']]);
+ $this->context['title']['page'] = $this->translator->trans('Dance %city%', ['%city%' => $this->context['city']['in']]);
//Set description
$this->context['description'] = $this->translator->trans('Indoor and outdoor dance calendar %city%', ['%city%' => $this->context['city']['in']]);
$response = new Response();
//With logged user
- if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
+ if ($this->checker->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
//Set last modified
$response->setLastModified(new \DateTime('-1 year'));
$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'] = $this->translator->trans('Libre Air locations');
+ $this->context['title']['page'] = $this->translator->trans('Libre Air locations');
//Set description
$this->context['description'] = $this->translator->trans('Libre Air location list');
];
//Create location forms for role_admin
- if ($this->isGranted('ROLE_ADMIN')) {
+ if ($this->checker->isGranted('ROLE_ADMIN')) {
//Fetch all locations
$locations = $this->doctrine->getRepository(Location::class)->findAll();
}
//Fetch calendar
- $this->context['calendar'] = $this->doctrine->getRepository(Session::class)->findAllByPeriodAsCalendarArray($this->period, !$this->isGranted('IS_AUTHENTICATED_REMEMBERED'), $this->context['location']['latitude'], $this->context['location']['longitude']);
+ $this->context['calendar'] = $this->doctrine->getRepository(Session::class)->findAllByPeriodAsCalendarArray($this->period, !$this->checker->isGranted('IS_AUTHENTICATED_REMEMBERED'), $this->context['location']['latitude'], $this->context['location']['longitude']);
//Set dances
$this->context['dances'] = [];
$response = new Response();
//With logged user
- if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
+ if ($this->checker->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
//Set last modified
$response->setLastModified(new \DateTime('-1 year'));
$dances = implode($this->translator->trans(' and '), array_filter(array_merge([implode(', ', array_slice($dances, 0, -1))], array_slice($dances, -1)), 'strlen'));
//Set title
- $this->context['title'] = $this->translator->trans('%dances% %location%', ['%dances%' => $dances, '%location%' => $this->context['location']['atin']]);
+ $this->context['title']['page'] = $this->translator->trans('%dances% %location%', ['%dances%' => $dances, '%location%' => $this->context['location']['atin']]);
//Set description
$this->context['description'] = $this->translator->trans('%dances% indoor and outdoor calendar %location%', ['%dances%' => $dances, '%location%' => $this->context['location']['at']]);
//Without dances
} else {
//Set title
- $this->context['title'] = $this->translator->trans('Dance %location%', ['%location%' => $this->context['location']['atin']]);
+ $this->context['title']['page'] = $this->translator->trans('Dance %location%', ['%location%' => $this->context['location']['atin']]);
//Set description
$this->context['description'] = $this->translator->trans('Indoor and outdoor dance calendar %location%', ['%location%' => $this->context['location']['at']]);