You are here

function drupal_install_profile_distribution_name in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/install.inc \drupal_install_profile_distribution_name()

Loads the installation profile, extracting its defined distribution name.

Return value

The distribution name defined in the profile's .info.yml file. Defaults to "Drupal" if none is explicitly provided by the installation profile.

See also

install_profile_info()

9 calls to drupal_install_profile_distribution_name()
InstallerTest::testInstaller in core/modules/system/src/Tests/Installer/InstallerTest.php
Ensures that the user page is available after installation.
install_check_requirements in core/includes/install.core.inc
Checks installation requirements and reports any errors.
install_database_errors in core/includes/install.core.inc
Checks a database connection and returns any errors.
install_finished in core/includes/install.core.inc
Performs final installation steps and displays a 'finished' page.
install_profile_modules in core/includes/install.core.inc
Installs required modules via a batch process.

... See full list

File

core/includes/install.inc, line 96
API functions for installing modules and themes.

Code

function drupal_install_profile_distribution_name() {

  // During installation, the profile information is stored in the global
  // installation state (it might not be saved anywhere yet).
  $info = array();
  if (drupal_installation_attempted()) {
    global $install_state;
    if (isset($install_state['profile_info'])) {
      $info = $install_state['profile_info'];
    }
  }
  else {
    $profile = drupal_get_profile();
    $info = system_get_info('module', $profile);
  }
  return isset($info['distribution']['name']) ? $info['distribution']['name'] : 'Drupal';
}