You are here

public function StateChange::__construct in Workbench Moderation Actions 8

Same name in this branch
  1. 8 src/Controller/StateChange.php \Drupal\workbench_moderation_actions\Controller\StateChange::__construct()
  2. 8 src/Plugin/Action/StateChange.php \Drupal\workbench_moderation_actions\Plugin\Action\StateChange::__construct()

Constructs a \Drupal\Component\Plugin\PluginBase 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.

Overrides PluginBase::__construct

File

src/Plugin/Action/StateChange.php, line 58

Class

StateChange
Publishes a media entity.

Namespace

Drupal\workbench_moderation_actions\Plugin\Action

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ModerationInformationInterface $mod_info, StateTransitionValidation $validation, EntityTypeManagerInterface $entityTypeManager, MessengerInterface $messenger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->moderationInfo = $mod_info;
  $this->validation = $validation;
  $this->entityTypeManager = $entityTypeManager;
  $this->messenger = $messenger;
}