You are here

public function Messenger::addStatus in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Messenger/Messenger.php \Drupal\Core\Messenger\Messenger::addStatus()

Adds a new status message to the queue.

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.

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::addStatus

File

core/lib/Drupal/Core/Messenger/Messenger.php, line 72

Class

Messenger
The messenger service.

Namespace

Drupal\Core\Messenger

Code

public function addStatus($message, $repeat = FALSE) {
  return $this
    ->addMessage($message, static::TYPE_STATUS, $repeat);
}