function MessengerInterface::messagesByType

Same name in other branches
  1. 9 core/lib/Drupal/Core/Messenger/MessengerInterface.php \Drupal\Core\Messenger\MessengerInterface::messagesByType()
  2. 8.9.x core/lib/Drupal/Core/Messenger/MessengerInterface.php \Drupal\Core\Messenger\MessengerInterface::messagesByType()
  3. 10 core/lib/Drupal/Core/Messenger/MessengerInterface.php \Drupal\Core\Messenger\MessengerInterface::messagesByType()

Gets all messages of a certain type.

Parameters

string $type: The messages' type. Either self::TYPE_STATUS, self::TYPE_WARNING, or self::TYPE_ERROR.

Return value

string[]|\Drupal\Component\Render\MarkupInterface[] The messages of given type.

1 method overrides MessengerInterface::messagesByType()
Messenger::messagesByType in core/lib/Drupal/Core/Messenger/Messenger.php
Gets all messages of a certain type.

File

core/lib/Drupal/Core/Messenger/MessengerInterface.php, line 112

Class

MessengerInterface
Stores runtime messages sent out to individual users on the page.

Namespace

Drupal\Core\Messenger

Code

public function messagesByType($type);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.