You are here

protected function ControllerBase::moduleHandler in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::moduleHandler()
  2. 9 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::moduleHandler()

Returns the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface

12 calls to ControllerBase::moduleHandler()
AdminController::index in core/modules/system/src/Controller/AdminController.php
Prints a listing of admin tasks, organized by module.
ContentTranslationController::overview in core/modules/content_translation/src/Controller/ContentTranslationController.php
Builds the translations overview page.
DbLogController::buildFilterQuery in core/modules/dblog/src/Controller/DbLogController.php
Builds a query for database log administration filters based on session.
DbLogController::overview in core/modules/dblog/src/Controller/DbLogController.php
Displays a listing of database log messages.
FileDownloadController::download in core/modules/system/src/FileDownloadController.php
Handles private file transfers.

... See full list

File

core/lib/Drupal/Core/Controller/ControllerBase.php, line 213

Class

ControllerBase
Utility base class for thin controllers.

Namespace

Drupal\Core\Controller

Code

protected function moduleHandler() {
  if (!$this->moduleHandler) {
    $this->moduleHandler = $this
      ->container()
      ->get('module_handler');
  }
  return $this->moduleHandler;
}