]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Controller/AbstractController.php
Replace dropped calls with checker, factory and security replacements
[airbundle] / Controller / AbstractController.php
index 8a10b87681016db671bb194fe15da59d4573585a..fe07f11877e677e9c554491a6c08b912167fd0ec 100644 (file)
@@ -376,7 +376,7 @@ abstract class AbstractController extends BaseAbstractController implements Serv
                                        //With user
                                        'user' => $this->checker->isGranted('ROLE_ADMIN'),
                                        //Set user choices
                                        //With user
                                        'user' => $this->checker->isGranted('ROLE_ADMIN'),
                                        //Set user choices
-                                       'user_choices' => $this->doctrine->getRepository(User::class)->findIndexByGroupPseudonym(),
+                                       'user_choices' => $this->doctrine->getRepository(User::class)->findChoicesAsArray(),
                                        //Set default user to current
                                        'user_default' => $this->getUser()->getId(),
                                        //Set to session slot or evening by default
                                        //Set default user to current
                                        'user_default' => $this->getUser()->getId(),
                                        //Set to session slot or evening by default
@@ -487,6 +487,7 @@ abstract class AbstractController extends BaseAbstractController implements Serv
                        //Append facebook image texts
                        $parameters['facebook']['texts'] += [
                                $parameters['title'] => [
                        //Append facebook image texts
                        $parameters['facebook']['texts'] += [
                                $parameters['title'] => [
+                                       'font' => 'irishgrover',
                                        'align' => 'left'
                                ]/*XXX: same problem as url, too long :'(,
                                $parameters['description'] => [
                                        'align' => 'left'
                                ]/*XXX: same problem as url, too long :'(,
                                $parameters['description'] => [
@@ -509,6 +510,18 @@ abstract class AbstractController extends BaseAbstractController implements Serv
                        }*/
                }
 
                        }*/
                }
 
+               //With empty locations link
+               if (empty($parameters['locations_link'])) {
+                       //Set locations link
+                       $parameters['locations_link'] = $this->router->generate('rapsys_air_location');
+               }
+
+               //With empty locations title
+               if (empty($parameters['locations_title'])) {
+                       //Set locations title
+                       $parameters['locations_title'] = $this->translator->trans('Locations', [], null, $this->locale);
+               }
+
                //With canonical
                if (!empty($parameters['canonical'])) {
                        //Set facebook url
                //With canonical
                if (!empty($parameters['canonical'])) {
                        //Set facebook url