public function LegacyMessenger::addMessage in Service Container 7.2
Same name and namespace in other branches
- 8 src/Messenger/LegacyMessenger.php \Drupal\service_container\Messenger\LegacyMessenger::addMessage()
- 7 src/Messenger/LegacyMessenger.php \Drupal\service_container\Messenger\LegacyMessenger::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
Overrides MessengerInterface::addMessage
File
- src/
Messenger/ LegacyMessenger.php, line 37 - Contains \Drupal\service_container\LegacyMessenger.
Class
- LegacyMessenger
- Class that manage the messages in Drupal.
Namespace
Drupal\service_container\MessengerCode
public function addMessage($message, $type = self::STATUS, $repeat = FALSE) {
$this->drupal7
->drupal_set_message($message, $type, $repeat);
return $this;
}