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

Returns the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface

238 calls to Drupal::moduleHandler()
AlterTest::testDrupalAlter in core/modules/system/tests/src/Kernel/Common/AlterTest.php
Tests if the theme has been altered.
authorize.php in core/authorize.php
Administrative script for running authorized file operations.
basic_auth_help in core/modules/basic_auth/basic_auth.module
Implements hook_help().
batch_process in core/includes/form.inc
Processes the batch.
BlockPluginCollection::initializePlugin in core/modules/block/src/BlockPluginCollection.php
Initializes and stores a plugin.

... See full list

File

core/lib/Drupal.php, line 542

Class

Drupal
Static Service Container wrapper.

Code

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