Permalink
Browse files

Merge pull request #142 from benja-M-1/patch-profiler

Update twig render tag usage
  • Loading branch information...
2 parents 2991d0d + 9f9bbab commit f1ddf3753bb274df72765edd92807af29730d890 @stof stof committed Jan 2, 2013
Showing with 33 additions and 2 deletions.
  1. +9 −0 README.md
  2. +11 −0 Resources/config/routing/profiler.xml
  3. +11 −0 Resources/doc/installation.rst
  4. +2 −2 Resources/views/Collector/db.html.twig
View
@@ -51,6 +51,15 @@ Add the following dependencies to your projects composer.json file:
# ..
}
+### Profiler routing
+
+Import the DoctrineBundle routing in your "app/config/routing_dev.yml" file:
+
+ _profiler_doctrine:
+ resource: "@DoctrineBundle/Resources/config/routing/profiler.xml"
+ prefix: /_doctrine
+
+
## Documentation
See the Resources/docs folder more a full documentation.
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<routes xmlns="http://symfony.com/schema/routing"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
+
+ <route id="_profiler_doctrine" pattern="/explain/{token}/{connectionName}/{query}">
+ <default key="_controller">DoctrineBundle:Profiler:explain</default>
+ </route>
+
+</routes>
@@ -41,3 +41,14 @@ Add the following dependencies to your projects composer.json file:
# ..
}
+
+3. Profiler routing
+
+Import the DoctrineBundle routing in your "app/config/routing_dev.yml" file:
+
+.. code-block::
+
+ _profiler_doctrine:
+ resource: "@DoctrineBundle/Resources/config/routing/profiler.xml"
+ prefix: /_doctrine
+
@@ -41,12 +41,12 @@
{% block panel %}
{% if 'explain' == page %}
- {% render 'DoctrineBundle:Profiler:explain' with {
+ {% render url('_profiler_doctrine', {
'token': token,
'panel': 'db',
'connectionName': app.request.query.get('connection'),
'query': app.request.query.get('query')
- } %}
+ }) %}
{% else %}
{{ block('queries') }}
{% endif %}

0 comments on commit f1ddf37

Please sign in to comment.