You are here

protected function ModuleExtensionList::getExtensionDiscovery in Drupal 9

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

Returns the extension discovery.

Return value

\Drupal\Core\Extension\ExtensionDiscovery

Overrides ExtensionList::getExtensionDiscovery

File

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

Class

ModuleExtensionList
Provides a list of available modules.

Namespace

Drupal\Core\Extension

Code

protected function getExtensionDiscovery() {
  $discovery = parent::getExtensionDiscovery();
  if ($active_profile = $this
    ->getActiveProfile()) {
    $discovery
      ->setProfileDirectories($this
      ->getProfileDirectories($discovery));
  }
  return $discovery;
}