function ControllerBase::moduleHandler
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::moduleHandler()
- 8.9.x core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::moduleHandler()
- 11.x core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\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\ControllerCode
protected function moduleHandler() {
if (!$this->moduleHandler) {
$this->moduleHandler = $this->container()
->get('module_handler');
}
return $this->moduleHandler;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.