You are here

public function Messenger::deleteAll in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Messenger/Messenger.php \Drupal\Core\Messenger\Messenger::deleteAll()

Deletes all messages.

Return value

string[]|\Drupal\Component\Render\MarkupInterface[] The deleted messages.

Overrides MessengerInterface::deleteAll

File

core/lib/Drupal/Core/Messenger/Messenger.php, line 93

Class

Messenger
The messenger service.

Namespace

Drupal\Core\Messenger

Code

public function deleteAll() {
  return $this->flashBag
    ->clear();
}