function Drupal::installProfile

Same name and namespace in other branches
  1. 9 core/lib/Drupal.php \Drupal::installProfile()
  2. 8.9.x core/lib/Drupal.php \Drupal::installProfile()
  3. 11.x core/lib/Drupal.php \Drupal::installProfile()

Gets the active install profile.

Return value

string|false|null The name of the active install profile. FALSE indicates that the site is not using an install profile. NULL indicates that the site has not yet been installed.

4 calls to Drupal::installProfile()
drupal_install_profile_distribution_name in core/includes/install.inc
Loads the installation profile, extracting its defined distribution name.
drupal_install_profile_distribution_version in core/includes/install.inc
Loads the installation profile, extracting its defined version.
ExtensionDiscovery::setProfileDirectoriesFromSettings in core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
Sets installation profile directories based on current site settings.
InstallStorage::getAllFolders in core/lib/Drupal/Core/Config/InstallStorage.php
Returns a map of all config object names and their folders.

File

core/lib/Drupal.php, line 231

Class

Drupal
Static Service Container wrapper.

Code

public static function installProfile() {
  return static::getContainer()->getParameter('install_profile');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.