public function WebformHelpManager::getNotifications in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformHelpManager.php \Drupal\webform\WebformHelpManager::getNotifications()
Get notifications.
@internal Currently being used to display notifications related to updates.
Parameters
string $type: (optional) The message's type. These values are supported: 'info', 'status', 'warning', 'error'.
Return value
array An array of messages for specified message type or all notifications grouped by type.
Overrides WebformHelpManagerInterface::getNotifications
1 call to WebformHelpManager::getNotifications()
- WebformHelpManager::initHelp in src/
WebformHelpManager.php - Initialize help.
File
- src/
WebformHelpManager.php, line 220
Class
- WebformHelpManager
- Webform help manager.
Namespace
Drupal\webformCode
public function getNotifications($type = NULL) {
$notifications = $this->state
->get('webform_help_notifications', []);
if ($type) {
return isset($notifications[$type]) ? $notifications[$type] : [];
}
else {
return $notifications;
}
}