You are here

public function Messenger::all in Drupal 9

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

Gets all messages.

Return value

string[][]|\Drupal\Component\Render\MarkupInterface[][] Keys are message types and values are indexed arrays of messages. Message types are either self::TYPE_STATUS, self::TYPE_WARNING, or self::TYPE_ERROR.

Overrides MessengerInterface::all

File

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

Class

Messenger
The messenger service.

Namespace

Drupal\Core\Messenger

Code

public function all() {
  return $this->flashBag
    ->peekAll();
}