public function WebformHelpManager::deleteNotification in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformHelpManager.php \Drupal\webform\WebformHelpManager::deleteNotification()
Delete a notification by id.
@internal Currently being used to display notifications related to updates.
Parameters
string $id: The notification id.
Overrides WebformHelpManagerInterface::deleteNotification
File
- src/
WebformHelpManager.php, line 233
Class
- WebformHelpManager
- Webform help manager.
Namespace
Drupal\webformCode
public function deleteNotification($id) {
$notifications = $this->state
->get('webform_help_notifications', []);
foreach ($notifications as &$messages) {
unset($messages[$id]);
}
array_filter($notifications);
$this->state
->set('webform_help_notifications', $notifications);
}