You are here

public function WorkspaceRequestSubscriber::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::__construct()
  2. 9 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;
}