public function TestMessenger::addMessage in Feeds extensible parsers 8
Adds a new message to the queue.
The messages will be displayed in the order they got added later.
Parameters
string|\Drupal\Component\Render\MarkupInterface $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::TYPE_STATUS, self::TYPE_WARNING, or self::TYPE_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 Messenger::addMessage
File
- src/
Messenger/ TestMessenger.php, line 27
Class
- TestMessenger
- Stores messages without calling drupal_set_message().
Namespace
Drupal\feeds_ex\MessengerCode
public function addMessage($message, $type = self::TYPE_STATUS, $repeat = FALSE) {
$this->messages[] = [
'message' => $message,
'type' => $type,
'repeat' => $repeat,
];
}