Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ControllerBase.php

function ControllerBase::moduleHandler

Returns the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface

File

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

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal