8.5.x Drupal.php Drupal::moduleHandler()
8.0.x Drupal.php Drupal::moduleHandler()
8.1.x Drupal.php Drupal::moduleHandler()
8.2.x Drupal.php Drupal::moduleHandler()
8.3.x Drupal.php Drupal::moduleHandler()
8.4.x Drupal.php Drupal::moduleHandler()
8.6.x Drupal.php Drupal::moduleHandler()

Returns the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface

File

core/lib/Drupal.php, line 497
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

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