function MessengerInterface::messagesByType
Same name in other branches
- 9 core/lib/Drupal/Core/Messenger/MessengerInterface.php \Drupal\Core\Messenger\MessengerInterface::messagesByType()
- 10 core/lib/Drupal/Core/Messenger/MessengerInterface.php \Drupal\Core\Messenger\MessengerInterface::messagesByType()
- 11.x 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.
2 methods override MessengerInterface::messagesByType()
- LegacyMessenger::messagesByType in core/
lib/ Drupal/ Core/ Messenger/ LegacyMessenger.php - Gets all messages of a certain type.
- 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\MessengerCode
public function messagesByType($type);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.