function SourcePluginBase::getModuleHandler

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::getModuleHandler()
  2. 10 core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::getModuleHandler()
  3. 11.x core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::getModuleHandler()

Gets the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface The module handler.

File

core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php, line 231

Class

SourcePluginBase
The base class for source plugins.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

protected function getModuleHandler() {
    if (!isset($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.