You are here

protected function ModuleExtensionList::doScanExtensions in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/ModuleExtensionList.php \Drupal\Core\Extension\ModuleExtensionList::doScanExtensions()
  2. 10 core/lib/Drupal/Core/Extension/ModuleExtensionList.php \Drupal\Core\Extension\ModuleExtensionList::doScanExtensions()

Scans the available extensions.

Overriding this method gives other code the chance to add additional extensions to this raw listing.

Return value

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

Overrides ExtensionList::doScanExtensions

File

core/lib/Drupal/Core/Extension/ModuleExtensionList.php, line 136

Class

ModuleExtensionList
Provides a list of available modules.

Namespace

Drupal\Core\Extension

Code

protected function doScanExtensions() {
  $extensions = parent::doScanExtensions();
  $profiles = $this->profileList
    ->getList();

  // Modify the active profile object that was previously added to the module
  // list.
  if ($this->installProfile && isset($profiles[$this->installProfile])) {
    $extensions[$this->installProfile] = $profiles[$this->installProfile];
  }
  return $extensions;
}