You are here

protected function ConfigUpdateController::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 ConfigUpdateController::getProfileName()
ConfigUpdateController::generateReport in config_update_ui/src/Controller/ConfigUpdateController.php
Generates a report about config updates.
ConfigUpdateController::generateReportLinks in config_update_ui/src/Controller/ConfigUpdateController.php
Generates the operations links for running individual reports.

File

config_update_ui/src/Controller/ConfigUpdateController.php, line 643

Class

ConfigUpdateController
Returns responses for Configuration Revert module operations.

Namespace

Drupal\config_update_ui\Controller

Code

protected function getProfileName() {

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

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