You are here

public function WorkspaceDeleteForm::__construct in Drupal 9

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

Constructs a WorkspaceDeleteForm object.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service.

\Drupal\workspaces\WorkspaceAssociationInterface $workspace_association: The workspace association service to check how many revisions will be deleted.

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

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

Overrides ContentEntityForm::__construct

File

core/modules/workspaces/src/Form/WorkspaceDeleteForm.php, line 70

Class

WorkspaceDeleteForm
Provides a form for deleting a workspace.

Namespace

Drupal\workspaces\Form

Code

public function __construct(EntityRepositoryInterface $entity_repository, WorkspaceAssociationInterface $workspace_association, WorkspaceRepositoryInterface $workspace_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL) {
  parent::__construct($entity_repository, $entity_type_bundle_info, $time);
  $this->workspaceAssociation = $workspace_association;
  $this->workspaceRepository = $workspace_repository;
}