You are here

protected function ModuleExtensionList::getActiveProfile in Drupal 10

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

Gets the processed active profile object, or null.

Return value

\Drupal\Core\Extension\Extension|null The active profile, if there is one.

File

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

Class

ModuleExtensionList
Provides a list of available modules.

Namespace

Drupal\Core\Extension

Code

protected function getActiveProfile() {
  $profiles = $this->profileList
    ->getList();
  if ($this->installProfile && isset($profiles[$this->installProfile])) {
    return $profiles[$this->installProfile];
  }
  return NULL;
}