function WorkspaceRequestSubscriber::__construct

Same name in other branches
  1. 9 core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::__construct()
  2. 10 core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::__construct()
  3. 11.x core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::__construct()

Constructs a new WorkspaceRequestSubscriber instance.

Parameters

\Drupal\path_alias\AliasManagerInterface $alias_manager: The alias manager.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.

\Drupal\workspaces\WorkspaceManagerInterface $workspace_manager: The workspace manager.

File

core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php, line 60

Class

WorkspaceRequestSubscriber
Provides a event subscriber for setting workspace-specific cache keys.

Namespace

Drupal\workspaces\EventSubscriber

Code

public function __construct(AliasManagerInterface $alias_manager, CurrentPathStack $current_path, RouteProviderInterface $route_provider, WorkspaceManagerInterface $workspace_manager) {
    $this->aliasManager = $alias_manager;
    $this->currentPath = $current_path;
    $this->routeProvider = $route_provider;
    $this->workspaceManager = $workspace_manager;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.