function Drupal::messenger

Same name in other branches
  1. 9 core/lib/Drupal.php \Drupal::messenger()
  2. 8.9.x core/lib/Drupal.php \Drupal::messenger()
  3. 10 core/lib/Drupal.php \Drupal::messenger()

Returns the messenger.

Return value

\Drupal\Core\Messenger\MessengerInterface The messenger.

6 calls to Drupal::messenger()
ConfigImporterBatch::finish in core/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php
Finish batch.
install_config_import_batch in core/includes/install.core.inc
Creates a batch for the config importer to process.
install_config_revert_install_changes in core/includes/install.core.inc
Reverts configuration if hook_install() implementations have made changes.
JSMessageTestController::messageLinksWithSystemMessages in core/modules/system/tests/modules/js_message_test/src/Controller/JSMessageTestController.php
Displays links to show messages via JavaScript with messages from backend.
MessengerTrait::messenger in core/lib/Drupal/Core/Messenger/MessengerTrait.php
Gets the messenger.

... See full list

File

core/lib/Drupal.php, line 744

Class

Drupal
Static Service Container wrapper.

Code

public static function messenger() {
    return static::getContainer()->get('messenger');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.