You are here

protected function ExtensionList::doList in Drupal 8

Same name and namespace in other branches
  1. 9 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.

4 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.
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;
}