You are here

protected function ConfigLister::getProfileName in Configuration Update Manager 8

Returns the name of the install profile.

For backwards compatibility with pre/post 8.3.x, tries to get it from either configuration or settings.

Return value

string The name of the install profile.

2 calls to ConfigLister::getProfileName()
ConfigLister::listConfig in src/ConfigLister.php
Lists the config objects in active and extension storage.
ConfigListerWithProviders::listProviders in src/ConfigListerWithProviders.php
Sets up and returns the config providers list.

File

src/ConfigLister.php, line 238

Class

ConfigLister
Provides methods related to config listing.

Namespace

Drupal\config_update

Code

protected function getProfileName() {

  // Code adapted from DrupalKernel::getInstalProfile() in Core.
  // In Core 8.3.x or later, read from config.
  $config = $this->activeConfigStorage
    ->read('core.extension');
  if (!empty($config['profile'])) {
    return $config['profile'];
  }
  else {

    // If system_update_8300() has not yet run, use settings.
    return Settings::get('install_profile');
  }
}