You are here

protected function ModuleExtensionList::getExtensionDiscovery in Drupal 8

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

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