PathAliasSubscriber
class PathAliasSubscriber implements EventSubscriberInterface (View source)
Provides a path subscriber that converts path aliases.
Properties
| protected AliasManagerInterface | $aliasManager | The alias manager that caches alias lookups based on the request. |
|
| protected CurrentPathStack | $currentPath | The current path. |
Methods
__construct(AliasManagerInterface $alias_manager, CurrentPathStack $current_path)
Constructs a new PathSubscriber instance.
onKernelController(ControllerEvent $event)
Sets the cache key on the alias manager cache decorator.
onKernelTerminate(TerminateEvent $event)
Ensures system paths for the request get cached.
static array
getSubscribedEvents()
Registers the methods in this class that should be listeners.
Details
__construct(AliasManagerInterface $alias_manager, CurrentPathStack $current_path)
Constructs a new PathSubscriber instance.
onKernelController(ControllerEvent $event)
Sets the cache key on the alias manager cache decorator.
KernelEvents::CONTROLLER is used in order to be executed after routing.
onKernelTerminate(TerminateEvent $event)
Ensures system paths for the request get cached.
static array
getSubscribedEvents()
Registers the methods in this class that should be listeners.