8.5.x bootstrap.inc drupal_get_profile()
8.0.x bootstrap.inc drupal_get_profile()
8.1.x bootstrap.inc drupal_get_profile()
8.2.x bootstrap.inc drupal_get_profile()
8.3.x bootstrap.inc drupal_get_profile()
8.4.x bootstrap.inc drupal_get_profile()
8.6.x bootstrap.inc drupal_get_profile()
7.x common.inc drupal_get_profile()

Gets the name of the currently active installation profile.

When this function is called during Drupal's initial installation process, the name of the profile that's about to be installed is stored in the global installation state. At all other times, the standard Drupal systems variable table contains the name of the current profile, and we can call variable_get() to determine what one is active.

Return value

$profile The name of the installation profile.

14 calls to drupal_get_profile()
DatabaseTasks::getFormOptions in includes/install.inc
Return driver specific configuration options.
DrupalWebTestCase::prepareEnvironment in modules/simpletest/drupal_web_test_case.php
Prepares the current environment for running the test.
drupal_required_modules in includes/module.inc
Returns an array of modules required by core.
drupal_system_listing in includes/common.inc
Returns information about system object files (modules, themes, etc.).
drupal_uninstall_modules in includes/install.inc
Uninstalls a given list of disabled modules.

... See full list

File

includes/common.inc, line 222
Common functions that many Drupal modules will need to reference.

Code

function drupal_get_profile() {
  global $install_state;
  if (isset($install_state['parameters']['profile'])) {
    $profile = $install_state['parameters']['profile'];
  }
  else {
    $profile = variable_get('install_profile', 'standard');
  }
  return $profile;
}