protected function SystemMessage::doExecute in Rules 8.3
Set a system message.
Parameters
string $message: Message string that should be set.
string $type: Type of the message.
bool $repeat: (optional) TRUE if the message should be repeated.
File
- src/
Plugin/ RulesAction/ SystemMessage.php, line 90
Class
- SystemMessage
- Provides a 'Show a message on the site' action.
Namespace
Drupal\rules\Plugin\RulesActionCode
protected function doExecute($message, $type, $repeat) {
// @todo Should we do the sanitization somewhere else? D7 had the sanitize
// flag in the context definition.
$message = Xss::filterAdmin($message);
$repeat = (bool) $repeat;
$this->messenger
->addMessage(Markup::create($message), $type, $repeat);
}