You are here

function config_installer_config_import_profile in Configuration installer 8

Processes profile as part of configuration sync.

Parameters

array $context.: The batch context.

\Drupal\Core\Config\ConfigImporter $config_importer: The config importer.

See also

config_install_batch()

1 string reference to 'config_installer_config_import_profile'
config_install_batch in ./config_installer.profile
Creates a batch for the config importer to process.

File

./config_installer.profile, line 226
Enables modules and site configuration for a minimal site installation.

Code

function config_installer_config_import_profile(array &$context, ConfigImporter $config_importer) {
  $orginal_profile = _config_installer_get_original_install_profile();
  if ($orginal_profile) {
    \Drupal::service('config.installer')
      ->setSyncing(TRUE)
      ->setSourceStorage($config_importer
      ->getStorageComparer()
      ->getSourceStorage());
    \Drupal::service('module_installer')
      ->install([
      $orginal_profile,
    ], FALSE);
    module_set_weight($orginal_profile, 1000);
    $context['message'] = t('Synchronising install profile: @name.', [
      '@name' => $orginal_profile,
    ]);
  }
  $context['finished'] = 1;
}