function MessageAction::__construct
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php \Drupal\Core\Action\Plugin\Action\MessageAction::__construct()
- 10 core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php \Drupal\Core\Action\Plugin\Action\MessageAction::__construct()
- 11.x 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\ActionCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.