You are here

public function MessengerInterface::addMessage in Service Container 7

Same name and namespace in other branches
  1. 8 src/Messenger/MessengerInterface.php \Drupal\service_container\Messenger\MessengerInterface::addMessage()
  2. 7.2 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

MessengerInterface

Namespace

Drupal\service_container\Messenger

Code

public function addMessage($message, $type = self::STATUS, $repeat = FALSE);