You are here

public function DeleteAction::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Action/Plugin/Action/DeleteAction.php \Drupal\Core\Action\Plugin\Action\DeleteAction::__construct()

Constructs a new DeleteAction object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

\Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory: The tempstore factory.

\Drupal\Core\Session\AccountInterface $current_user: Current user.

Overrides EntityActionBase::__construct

2 calls to DeleteAction::__construct()
DeleteComment::__construct in core/modules/comment/src/Plugin/Action/DeleteComment.php
Constructs a new DeleteAction object.
DeleteNode::__construct in core/modules/node/src/Plugin/Action/DeleteNode.php
Constructs a new DeleteAction object.
2 methods override DeleteAction::__construct()
DeleteComment::__construct in core/modules/comment/src/Plugin/Action/DeleteComment.php
Constructs a new DeleteAction object.
DeleteNode::__construct in core/modules/node/src/Plugin/Action/DeleteNode.php
Constructs a new DeleteAction object.

File

core/lib/Drupal/Core/Action/Plugin/Action/DeleteAction.php, line 51

Class

DeleteAction
Redirects to an entity deletion form.

Namespace

Drupal\Core\Action\Plugin\Action

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) {
  $this->currentUser = $current_user;
  $this->tempStore = $temp_store_factory
    ->get('entity_delete_multiple_confirm');
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager);
}