function WorkspaceManager::__construct
Same name and namespace in other branches
- 10 core/modules/workspaces/src/WorkspaceManager.php \Drupal\workspaces\WorkspaceManager::__construct()
- 9 core/modules/workspaces/src/WorkspaceManager.php \Drupal\workspaces\WorkspaceManager::__construct()
- 8.9.x core/modules/workspaces/src/WorkspaceManager.php \Drupal\workspaces\WorkspaceManager::__construct()
File
-
core/
modules/ workspaces/ src/ WorkspaceManager.php, line 38
Class
- WorkspaceManager
- Provides the workspace manager.
Namespace
Drupal\workspacesCode
public function __construct(protected RequestStack $requestStack, #[AutowireIterator(tag: 'workspace_negotiator')] protected $negotiators, #[AutowireServiceClosure('entity_type.manager')] protected $entityTypeManager, #[AutowireServiceClosure('event_dispatcher')] protected $eventDispatcher) {
if (!$negotiators instanceof \IteratorAggregate) {
@trigger_error('Calling ' . __METHOD__ . '() without the $negotiators argument is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3532939', E_USER_DEPRECATED);
$this->negotiators = $this->collectedNegotiators;
}
if (!$entityTypeManager instanceof \Closure) {
@trigger_error('Calling ' . __METHOD__ . '() without the $entityTypeManager argument is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3532939', E_USER_DEPRECATED);
$this->eventDispatcher = new ServiceClosureArgument(new Reference('entity_type.manager'));
}
if (!$eventDispatcher instanceof \Closure) {
@trigger_error('Calling ' . __METHOD__ . '() without the $eventDispatcher argument is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3532939', E_USER_DEPRECATED);
$this->eventDispatcher = new ServiceClosureArgument(new Reference('event_dispatcher'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.