You are here

public function ExtensionDiscovery::setProfileDirectoriesFromSettings in Drupal 10

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

Sets installation profile directories based on current site settings.

Return value

$this

File

core/lib/Drupal/Core/Extension/ExtensionDiscovery.php, line 229

Class

ExtensionDiscovery
Discovers available extensions in the filesystem.

Namespace

Drupal\Core\Extension

Code

public function setProfileDirectoriesFromSettings() {
  $this->profileDirectories = [];
  if ($profile = \Drupal::installProfile()) {
    $this->profileDirectories[] = \Drupal::service('extension.list.profile')
      ->getPath($profile);
  }
  return $this;
}