public function MessengerInterface::addMessage in Service Container 7.2
Same name and namespace in other branches
- 8 src/Messenger/MessengerInterface.php \Drupal\service_container\Messenger\MessengerInterface::addMessage()
- 7 src/Messenger/MessengerInterface.php \Drupal\service_container\Messenger\MessengerInterface::addMessage()
Adds a new message to the queue.
Parameters
string $message: (optional) The translated message to be displayed to the user. For consistency with other messages, it should begin with a capital letter and end with a period.
string $type: (optional) The message's type. Either self::STATUS, self::WARNING, or self::ERROR.
bool $repeat: (optional) If this is FALSE and the message is already set, then the message won't be repeated. Defaults to FALSE.
Return value
$this
1 method overrides MessengerInterface::addMessage()
- LegacyMessenger::addMessage in src/
Messenger/ LegacyMessenger.php - Adds a new message to the queue.
File
- src/
Messenger/ MessengerInterface.php, line 43 - Contains \Drupal\Core\Messenger\MessengerInterface.
Class
Namespace
Drupal\service_container\MessengerCode
public function addMessage($message, $type = self::STATUS, $repeat = FALSE);