WorkspaceRequestSubscriber
class WorkspaceRequestSubscriber implements EventSubscriberInterface (View source)
Provides a event subscriber for setting workspace-specific cache keys.
Properties
| protected AliasManagerInterface | $aliasManager | The alias manager that caches alias lookups based on the request. |
|
| protected CurrentPathStack | $currentPath | The current path. |
|
| protected RouteProviderInterface | $routeProvider | The route provider to load routes by name. |
|
| protected WorkspaceManagerInterface | $workspaceManager | The workspace manager. |
Methods
Constructs a new WorkspaceRequestSubscriber instance.
Sets the cache key on the alias manager cache decorator.
Adds the active workspace as a cache key part to the route provider.
{@inheritDoc}
Details
__construct(AliasManagerInterface $alias_manager, CurrentPathStack $current_path, RouteProviderInterface $route_provider, WorkspaceManagerInterface $workspace_manager)
Constructs a new WorkspaceRequestSubscriber 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.
onKernelRequest(RequestEvent $event)
Adds the active workspace as a cache key part to the route provider.
static array
getSubscribedEvents()
{@inheritDoc}