function WorkspaceOperationFactory::__construct

Same name and namespace in other branches
  1. 10 core/modules/workspaces/src/WorkspaceOperationFactory.php \Drupal\workspaces\WorkspaceOperationFactory::__construct()
  2. 9 core/modules/workspaces/src/WorkspaceOperationFactory.php \Drupal\workspaces\WorkspaceOperationFactory::__construct()
  3. 8.9.x core/modules/workspaces/src/WorkspaceOperationFactory.php \Drupal\workspaces\WorkspaceOperationFactory::__construct()
  4. main core/modules/workspaces/src/WorkspaceOperationFactory.php \Drupal\workspaces\WorkspaceOperationFactory::__construct()

File

core/modules/workspaces/src/WorkspaceOperationFactory.php, line 22

Class

WorkspaceOperationFactory
Defines a factory class for workspace operations.

Namespace

Drupal\workspaces

Code

public function __construct(protected EntityTypeManagerInterface $entityTypeManager, protected Connection $database, protected WorkspaceManagerInterface $workspaceManager, protected WorkspaceTrackerInterface $workspaceTracker, protected EventDispatcherInterface $eventDispatcher, #[Autowire(service: 'logger.channel.workspaces')] protected LoggerInterface $logger, protected ?TimeInterface $time = NULL) {
  if ($time === NULL) {
    @trigger_error('Calling ' . __CLASS__ . ' constructor without the $time argument is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3531039', E_USER_DEPRECATED);
    $this->time = \Drupal::time();
  }
}

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