You are here

public function WorkspaceAssociation::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::__construct()
  2. 9 core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::__construct()

Constructs a WorkspaceAssociation object.

Parameters

\Drupal\Core\Database\Connection $connection: A database connection for reading and writing path aliases.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager for querying revisions.

\Drupal\workspaces\WorkspaceRepositoryInterface $workspace_repository: The Workspace repository service.

File

core/modules/workspaces/src/WorkspaceAssociation.php, line 51

Class

WorkspaceAssociation
Provides a class for CRUD operations on workspace associations.

Namespace

Drupal\workspaces

Code

public function __construct(Connection $connection, EntityTypeManagerInterface $entity_type_manager, WorkspaceRepositoryInterface $workspace_repository) {
  $this->database = $connection;
  $this->entityTypeManager = $entity_type_manager;
  $this->workspaceRepository = $workspace_repository;
}