function Drupal::messenger

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

Returns the messenger.

Return value

\Drupal\Core\Messenger\MessengerInterface The messenger.

7 calls to Drupal::messenger()
BigPipe::__construct in core/modules/big_pipe/src/Render/BigPipe.php
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.

... See full list

File

core/lib/Drupal.php, line 742

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.