You are here

public function ConfigSelector::setCurrentConfigList in Configuration selector 8

Same name and namespace in other branches
  1. 8.2 src/ConfigSelector.php \Drupal\config_selector\ConfigSelector::setCurrentConfigList()

Stores a list of active configuration prior to module installation.

The list makes it simple to work out what configuration is new and if we have to enable or disable any configuration.

Parameters

string $module: The module being installed.

Return value

$this

See also

config_selector_module_preinstall()

File

src/ConfigSelector.php, line 101

Class

ConfigSelector
Selects configuration to enable after a module install or uninstall.

Namespace

Drupal\config_selector

Code

public function setCurrentConfigList($module) {
  if ($module === 'config_selector') {

    // If the Configuration Selector module is being installed, process all
    // existing configuration in
    // \Drupal\config_selector\ConfigSelector::selectConfig().
    $list = [];
  }
  else {
    $list = $this->configFactory
      ->listAll();
  }
  $this->state
    ->set('config_selector.current_config_list', $list);
  return $this;
}