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. 10 core/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php \Drupal\Core\Action\Plugin\Action\SaveAction::__construct()
  3. 11.x 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

2 calls to SaveAction::__construct()
SaveComment::__construct in core/modules/comment/src/Plugin/Action/SaveComment.php
Constructs a SaveAction object.
SaveNode::__construct in core/modules/node/src/Plugin/Action/SaveNode.php
Constructs a SaveAction object.
2 methods override SaveAction::__construct()
SaveComment::__construct in core/modules/comment/src/Plugin/Action/SaveComment.php
Constructs a SaveAction object.
SaveNode::__construct in core/modules/node/src/Plugin/Action/SaveNode.php
Constructs a SaveAction object.

File

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

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.