You are here

protected function ModuleExtensionList::getActiveProfile in Drupal 9

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

1 call to ModuleExtensionList::getActiveProfile()
ModuleExtensionList::getExtensionDiscovery in core/lib/Drupal/Core/Extension/ModuleExtensionList.php
Returns the extension discovery.

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