PHP Class Networking\InitCmsBundle\EventListener\AdminToolbarListener

The onKernelResponse method must be connected to the kernel.response event. The Admin Toolbar is only injected on well-formed HTML (with a proper tag). This means that the Admin Toolbar is never included in sub-requests or ESI requests.
Author: Yorkie Chadwick ([email protected])
Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Mostrar archivo Open project: networking/init-cms-bundle

Protected Properties

Property Type Description
$authorizationChecker Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
$mode integer
$position string
$twig Twig_Environment

Public Methods

Method Description
__construct ( Twig_Environment $twig, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $securityContext, $mode = self::ENABLED, $position = 'top' )
getSubscribedEvents ( )
isEnabled ( )
onKernelResponse ( FilterResponseEvent $event )

Protected Methods

Method Description
injectToolbar ( Response $response, Request $request ) Injects the admin toolbar into the given Response.

Method Details

__construct() public method

public __construct ( Twig_Environment $twig, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $securityContext, $mode = self::ENABLED, $position = 'top' )
$twig Twig_Environment
$securityContext Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

injectToolbar() protected method

Injects the admin toolbar into the given Response.
protected injectToolbar ( Response $response, Request $request )
$response Symfony\Component\HttpFoundation\Response
$request Symfony\Component\HttpFoundation\Request

isEnabled() public method

public isEnabled ( )

onKernelResponse() public method

public onKernelResponse ( FilterResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterResponseEvent

Property Details

$authorizationChecker protected_oe property

protected AuthorizationCheckerInterface,Symfony\Component\Security\Core\Authorization $authorizationChecker
return Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface

$mode protected_oe property

protected int $mode
return integer

$position protected_oe property

protected string $position
return string

$twig protected_oe property

protected Twig_Environment $twig
return Twig_Environment