function HandlerBase::getModuleHandler

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::getModuleHandler()
  2. 8.9.x core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::getModuleHandler()
  3. 10 core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::getModuleHandler()

Gets the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface

File

core/modules/views/src/Plugin/views/HandlerBase.php, line 309

Class

HandlerBase
Base class for Views handler plugins.

Namespace

Drupal\views\Plugin\views

Code

protected function getModuleHandler() {
    if (!$this->moduleHandler) {
        $this->moduleHandler = \Drupal::moduleHandler();
    }
    return $this->moduleHandler;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.