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.
[AmpSubrequestExtraBundle]
git=http://github.com/hubertperron/AmpSubrequestExtraBundle.git
target=/bundles/Amp/SubrequestExtraBundle
{
"require": {
"amp/subrequestextra-bundle": "dev-master"
}
}
// File: app/AppKernel.php
public function registerBundles()
{
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
// ...
new Amp\SubrequestExtraBundle\AmpSubrequestExtraBundle();
);
}
// File: app/autoload.php
$loader->registerNamespaces(array(
// ...
'Amp' => __DIR__.'/../vendor/bundles',
));
amp_subrequest_extra:
ignore_controllers:
- AcmeDemoBundle:Welcome:index
- AcmeDemoBundle:Example:list
Use the web debug toolbar icon to toggle the subrequests wrapper.
Without using parameters.
{% render 'LoremBundle:Generate:ExampleWithoutParameters' %}
Using parameters.
{% render 'LoremBundle:Generate:ExampleWithParameters' with { id: 1, hash: '0a7254fc5', displayActive: true } %}
Returning an empty response.
{% render 'LoremBundle:Generate:ExampleReturningEmptyResponse' %}