function CategorizingPluginManagerTrait::getModuleExtensionList

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php \Drupal\Core\Plugin\CategorizingPluginManagerTrait::getModuleExtensionList()

Returns the module extension list used.

Return value

\Drupal\Core\Extension\ModuleExtensionList The module extension list.

File

core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php, line 87

Class

CategorizingPluginManagerTrait
Provides a trait for the CategorizingPluginManagerInterface.

Namespace

Drupal\Core\Plugin

Code

protected function getModuleExtensionList() : ModuleExtensionList {
    // If the class has an injected module extension list, use it. Otherwise
    // fall back to fetch it from the service container.
    if (isset($this->moduleExtensionList)) {
        return $this->moduleExtensionList;
    }
    return \Drupal::service('extension.list.module');
}

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