From 7cff7f2f209304171c11319bd272c380c54d6200 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 7 Nov 2019 04:48:54 +0100 Subject: [PATCH] Cleanup Retrieve alias from central getAlias() function --- Controller/DefaultController.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Controller/DefaultController.php b/Controller/DefaultController.php index f7df53b..b0aed10 100644 --- a/Controller/DefaultController.php +++ b/Controller/DefaultController.php @@ -11,7 +11,6 @@ use Rapsys\AirBundle\Entity\Session; use Rapsys\AirBundle\Entity\Application; use Symfony\Component\Form\FormError; -#class DefaultController extends Controller { class DefaultController extends AbstractController { //Config array protected $config; @@ -21,7 +20,7 @@ class DefaultController extends AbstractController { public function __construct(ContainerInterface $container, Translator $translator) { //Retrieve config - $this->config = $container->getParameter('rapsys_air'); + $this->config = $container->getParameter($this->getAlias()); //Set the translator $this->translator = $translator; @@ -318,4 +317,11 @@ class DefaultController extends AbstractController { return $this->render('@RapsysAir/admin/session.html.twig', ['title' => $title, 'section' => $section, /*'form' => $form->createView(),*/ 'session' => $session]); } + + /** + * {@inheritdoc} + */ + public function getAlias() { + return 'rapsys_air'; + } } -- 2.41.0