From 15f80e30cd9dd52ba48892009320454b3d962442 Mon Sep 17 00:00:00 2001 From: Tom Peters Date: Mon, 11 Mar 2024 16:31:44 +0100 Subject: [PATCH] fix(MOS-1414): Extended PanelController from AbstractController. --- Controller/PanelController.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Controller/PanelController.php b/Controller/PanelController.php index 273b3141..1466e154 100644 --- a/Controller/PanelController.php +++ b/Controller/PanelController.php @@ -10,6 +10,7 @@ namespace Propel\Bundle\PropelBundle\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Response; @@ -19,7 +20,7 @@ * * @author William DURAND */ -class PanelController implements ContainerAwareInterface +class PanelController extends AbstractController implements ContainerAwareInterface { use ContainerAwareTrait; @@ -29,15 +30,15 @@ class PanelController implements ContainerAwareInterface public function configurationAction() { return new Response( - $this->container->get('twig')->render( + $this->render( '@Propel/Panel/configuration.html.twig', [ 'propel_version' => \Propel::VERSION, 'configuration' => $this->container->get('propel.configuration')->getParameters(), - 'default_connection' => $this->container->getParameter('propel.dbal.default_connection'), - 'logging' => $this->container->getParameter('propel.logging'), - 'path' => $this->container->getParameter('propel.path'), - 'phing_path' => $this->container->getParameter('propel.phing_path'), + 'default_connection' => $this->getParameter('propel.dbal.default_connection'), + 'logging' => $this->getParameter('propel.logging'), + 'path' => $this->getParameter('propel.path'), + 'phing_path' => $this->getParameter('propel.phing_path'), ] ) ); @@ -78,7 +79,7 @@ public function explainAction($token, $connection, $query) } return new Response( - $this->container->get('twig')->render( + $this->render( '@Propel/Panel/explain.html.twig', [ 'data' => $results,