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
Afficher le fichier Open project: networking/init-cms-bundle

Protected Properties

Свойство Type Description
$authorizationChecker Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
$mode integer
$position string
$twig Twig_Environment

Méthodes publiques

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

Méthodes protégées

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

Method Details

__construct() public méthode

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 méthode

public static getSubscribedEvents ( )

injectToolbar() protected méthode

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 méthode

public isEnabled ( )

onKernelResponse() public méthode

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

Property Details

$authorizationChecker protected_oe property

protected AuthorizationCheckerInterface,Symfony\Component\Security\Core\Authorization $authorizationChecker
Résultat Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface

$mode protected_oe property

protected int $mode
Résultat integer

$position protected_oe property

protected string $position
Résultat string

$twig protected_oe property

protected Twig_Environment $twig
Résultat Twig_Environment