/**
* Builds the list of extensions.
*
* @return \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.
*/
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;
}