You are here

public function ExtensionDiscovery::setProfileDirectoriesFromSettings in Drupal 8

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

Sets installation profile directories based on current site settings.

Return value

$this

1 call to ExtensionDiscovery::setProfileDirectoriesFromSettings()
ExtensionDiscovery::scan in core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
Discovers available extensions of a given type.

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_get_path('profile', $profile);
  }
  return $this;
}