Retrieve alias from central getAlias() function
use Rapsys\AirBundle\Entity\Application;
use Symfony\Component\Form\FormError;
use Rapsys\AirBundle\Entity\Application;
use Symfony\Component\Form\FormError;
-#class DefaultController extends Controller {
class DefaultController extends AbstractController {
//Config array
protected $config;
class DefaultController extends AbstractController {
//Config array
protected $config;
public function __construct(ContainerInterface $container, Translator $translator) {
//Retrieve config
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;
//Set the translator
$this->translator = $translator;
return $this->render('@RapsysAir/admin/session.html.twig', ['title' => $title, 'section' => $section, /*'form' => $form->createView(),*/ 'session' => $session]);
}
return $this->render('@RapsysAir/admin/session.html.twig', ['title' => $title, 'section' => $section, /*'form' => $form->createView(),*/ 'session' => $session]);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAlias() {
+ return 'rapsys_air';
+ }