public function LegacyMessenger::getMessagesByType in Service Container 7.2
Same name and namespace in other branches
- 8 src/Messenger/LegacyMessenger.php \Drupal\service_container\Messenger\LegacyMessenger::getMessagesByType()
- 7 src/Messenger/LegacyMessenger.php \Drupal\service_container\Messenger\LegacyMessenger::getMessagesByType()
Gets all messages of a certain type.
Parameters
string $type: The messages' type. Either self::STATUS, self::WARNING, or self::ERROR.
Return value
string[]
Overrides MessengerInterface::getMessagesByType
File
- src/
Messenger/ LegacyMessenger.php, line 52 - Contains \Drupal\service_container\LegacyMessenger.
Class
- LegacyMessenger
- Class that manage the messages in Drupal.
Namespace
Drupal\service_container\MessengerCode
public function getMessagesByType($type) {
$messages = $this->drupal7
->drupal_get_messages($type, FALSE);
return isset($messages[$type]) ? $messages[$type] : array();
}