function ExtensionList::doList

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::doList()
  2. 8.9.x 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
ThemeExtensionList::doList in core/lib/Drupal/Core/Extension/ThemeExtensionList.php
3 methods override ExtensionList::doList()
DatabaseDriverList::doList in core/lib/Drupal/Core/Extension/DatabaseDriverList.php
ModuleExtensionList::doList in core/lib/Drupal/Core/Extension/ModuleExtensionList.php
ThemeExtensionList::doList in core/lib/Drupal/Core/Extension/ThemeExtensionList.php

File

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

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) {
        $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.