function ExtensionList::doList

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::doList()
  2. 10 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::doList()
  3. 11.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::doList()

Builds the list of extensions.

Return value

\Drupal\Core\Extension\Extension[] Processed extension objects, keyed by machine name.

Throws

\Drupal\Core\Extension\InfoParserException If one of the .info.yml files is incomplete, or causes a parsing error.

3 calls to ExtensionList::doList()
ExtensionList::getList in core/lib/Drupal/Core/Extension/ExtensionList.php
Returns all available extensions.
ModuleExtensionList::doList in core/lib/Drupal/Core/Extension/ModuleExtensionList.php
Builds the list of extensions.
ThemeExtensionList::doList in core/lib/Drupal/Core/Extension/ThemeExtensionList.php
Builds the list of extensions.
2 methods override ExtensionList::doList()
ModuleExtensionList::doList in core/lib/Drupal/Core/Extension/ModuleExtensionList.php
Builds the list of extensions.
ThemeExtensionList::doList in core/lib/Drupal/Core/Extension/ThemeExtensionList.php
Builds the list of extensions.

File

core/lib/Drupal/Core/Extension/ExtensionList.php, line 310

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

protected function doList() {
    // Find extensions.
    $extensions = $this->doScanExtensions();
    // Read info files for each extension.
    foreach ($extensions as $extension_name => $extension) {
        $extension->info = $this->createExtensionInfo($extension);
        // Invoke hook_system_info_alter() to give installed modules a chance to
        // modify the data in the .info.yml files if necessary.
        $this->moduleHandler
            ->alter('system_info', $extension->info, $extension, $this->type);
    }
    return $extensions;
}

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