dev-master
9999999-dev https://github.com/hubertperron/AmpSubrequestExtraBundleA Symfony2 bundle to visually debug subrequests
MIT
The Requires
by Hubert Perron
debug toolbar subrequest
A Symfony2 bundle to visually debug subrequests
This bundle add a way to graphically view each subrequests used on a single page. Subrequests are wrapped in a template container displaying additional information about the request., (*1)
[AmpSubrequestExtraBundle] git=http://github.com/hubertperron/AmpSubrequestExtraBundle.git target=/bundles/Amp/SubrequestExtraBundle
{ "require": { "amp/subrequestextra-bundle": "dev-master" } }
``` php // File: app/AppKernel.php public function registerBundles() { if (in_array($this->getEnvironment(), array('dev', 'test'))) { // ... new Amp\SubrequestExtraBundle\AmpSubrequestExtraBundle(); ); }, (*2)
### Register namespace (Symfony 2.0.x) ``` php // File: app/autoload.php $loader->registerNamespaces(array( // ... 'Amp' => __DIR__.'/../vendor/bundles', ));
``` yaml amp_subrequest_extra: ignore_controllers: - AcmeDemoBundle:Welcome:index - AcmeDemoBundle:Example:list, (*3)
## Usage Use the web debug toolbar icon to toggle the subrequests wrapper. ## Example Without using parameters. ``` twig {% render 'LoremBundle:Generate:ExampleWithoutParameters' %}
, (*4)
Using parameters., (*5)
``` twig {% render 'LoremBundle:Generate:ExampleWithParameters' with { id: 1, hash: '0a7254fc5', displayActive: true } %}, (*6)
![with parameters](https://raw.github.com/hubertperron/AmpSubrequestExtraBundle/master/Resources/doc/with_parameters.png) Returning an empty response. ``` twig {% render 'LoremBundle:Generate:ExampleReturningEmptyResponse' %}
, (*7)
A Symfony2 bundle to visually debug subrequests
MIT
debug toolbar subrequest