amp / subrequestextra-bundle
A Symfony2 bundle to visually debug subrequests
Installs: 1 569
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- symfony/symfony: 2.*
This package is not auto-updated.
Last update: 2022-10-29 03:40:10 UTC
README
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.
Installation
Using the deps file
[AmpSubrequestExtraBundle]
git=http://github.com/hubertperron/AmpSubrequestExtraBundle.git
target=/bundles/Amp/SubrequestExtraBundle
Using composer
{
"require": {
"amp/subrequestextra-bundle": "dev-master"
}
}
Add the bundle to your application kernel
// File: app/AppKernel.php public function registerBundles() { if (in_array($this->getEnvironment(), array('dev', 'test'))) { // ... new Amp\SubrequestExtraBundle\AmpSubrequestExtraBundle(); ); }
Register namespace (Symfony 2.0.x)
// File: app/autoload.php $loader->registerNamespaces(array( // ... 'Amp' => __DIR__.'/../vendor/bundles', ));
Configuration
amp_subrequest_extra: ignore_controllers: - AcmeDemoBundle:Welcome:index - AcmeDemoBundle:Example:list
Usage
Use the web debug toolbar icon to toggle the subrequests wrapper.
Example
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' %}