You are here

protected function ModuleExtensionList::doScanExtensions in Drupal 10

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

File

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

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