do not require the templating component (#456)
This commit is contained in:
parent
4df8ff614c
commit
af88d81d9a
|
@ -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,
|
||||
|
|
|
@ -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%">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
|
||||
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
||||
|
||||
{% block toolbar %}
|
||||
{# the web debug toolbar content #}
|
||||
|
|
Loading…
Reference in a new issue