do not require the templating component (#456)

This commit is contained in:
Gregor Harlan 2017-08-31 17:49:55 +02:00 committed by Marc J. Schmidt
parent 4df8ff614c
commit af88d81d9a
3 changed files with 11 additions and 14 deletions

View File

@ -11,6 +11,7 @@
namespace Propel\Bundle\PropelBundle\Controller;
use Propel\Runtime\Propel;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\HttpFoundation\Response;
@ -20,23 +21,19 @@ use Symfony\Component\HttpFoundation\Response;
*
* @author William DURAND <william.durand1@gmail.com>
*/
class PanelController implements ContainerAwareInterface
class PanelController extends Controller
{
use ContainerAwareTrait;
/**
* This method renders the global Propel configuration.
*/
public function configurationAction()
{
$templating = $this->container->get('templating');
return $templating->renderResponse(
'PropelBundle:Panel:configuration.html.twig',
return $this->render(
'@Propel/Panel/configuration.html.twig',
array(
'propel_version' => Propel::VERSION,
'configuration' => $this->container->getParameter('propel.configuration'),
'logging' => $this->container->getParameter('propel.logging'),
'configuration' => $this->getParameter('propel.configuration'),
'logging' => $this->getParameter('propel.logging'),
)
);
}
@ -52,7 +49,7 @@ class PanelController implements ContainerAwareInterface
*/
public function explainAction($token, $connection, $query)
{
$profiler = $this->container->get('profiler');
$profiler = $this->get('profiler');
$profiler->disable();
$profile = $profiler->loadProfile($token);
@ -73,8 +70,8 @@ class PanelController implements ContainerAwareInterface
return new Response('<div class="error">This query cannot be explained.</div>');
}
return $this->container->get('templating')->renderResponse(
'PropelBundle:Panel:explain.html.twig',
return $this->render(
'@Propel/Panel/explain.html.twig',
array(
'data' => $results,
'query' => $query,

View File

@ -32,7 +32,7 @@
<service id="propel.data_collector" class="%propel.data_collector.class%" public="false">
<argument type="service" id="propel.logger" />
<tag name="data_collector" template="PropelBundle:Collector:propel" id="propel" />
<tag name="data_collector" template="@Propel/Collector/propel" id="propel" />
</service>
<service id="propel.twig.extension.syntax" class="%propel.twig.extension.syntax.class%">

View File

@ -1,4 +1,4 @@
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% block toolbar %}
{# the web debug toolbar content #}