function SaveAction::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php \Drupal\Core\Action\Plugin\Action\SaveAction::__construct()
  2. 8.9.x core/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php \Drupal\Core\Action\Plugin\Action\SaveAction::__construct()
  3. 10 core/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php \Drupal\Core\Action\Plugin\Action\SaveAction::__construct()

Constructs a SaveAction object.

Parameters

mixed[] $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\Component\Datetime\TimeInterface $time: The time service.

Overrides EntityActionBase::__construct

File

core/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php, line 44

Class

SaveAction
Provides an action that can save any entity.

Namespace

Drupal\Core\Action\Plugin\Action

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, TimeInterface $time) {
    parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager);
    $this->time = $time;
}

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