You are here

public function MessageAction::__construct in Drupal 8

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

Constructs a MessageAction 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\Utility\Token $token: The token service.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

Overrides ConfigurableActionBase::__construct

File

core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php, line 63

Class

MessageAction
Sends a message to the current user's screen.

Namespace

Drupal\Core\Action\Plugin\Action

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, Token $token, RendererInterface $renderer, MessengerInterface $messenger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->token = $token;
  $this->renderer = $renderer;
  $this->messenger = $messenger;
}