function Drupal::messenger

Same name in other branches
  1. 8.9.x core/lib/Drupal.php \Drupal::messenger()
  2. 10 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()
ConfigImporterBatch::finish in core/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php
Finish batch.
Cookie::__construct in core/modules/user/src/Authentication/Provider/Cookie.php
Constructs a new cookie authentication provider.
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.
MessengerTrait::messenger in core/lib/Drupal/Core/Messenger/MessengerTrait.php
Gets the messenger.

... See full list

File

core/lib/Drupal.php, line 751

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.