Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DrupalKernel.php

function DrupalKernel::getInstallProfile

Gets the active install profile.

Return value

string|false|null The name of the active install profile or distribution, FALSE if there is no install profile or NULL if Drupal is being installed.

3 calls to DrupalKernel::getInstallProfile()
DrupalKernel::compileContainer in core/lib/Drupal/Core/DrupalKernel.php
Compiles a new service container.
InstallerKernel::getInstallProfile in core/lib/Drupal/Core/Installer/InstallerKernel.php
Gets the active install profile.
InstallerKernel::getInstallProfile in core/lib/Drupal/Core/Installer/InstallerKernel.php
Gets the active install profile.
1 method overrides DrupalKernel::getInstallProfile()
InstallerKernel::getInstallProfile in core/lib/Drupal/Core/Installer/InstallerKernel.php
Gets the active install profile.

File

core/lib/Drupal/Core/DrupalKernel.php, line 1667

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function getInstallProfile() {
    $config = $this->getConfigStorage()
        ->read('core.extension');
    if (is_array($config) && !array_key_exists('profile', $config)) {
        return FALSE;
    }
    return $config['profile'] ?? NULL;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal