You are here

protected function FarmUpdate::getExcludedItems in farmOS 2.x

Lists excluded config items.

Lists config items that should be excluded from all automatic updates.

Return value

array An array of config item names.

1 call to FarmUpdate::getExcludedItems()
FarmUpdate::rebuild in modules/core/update/src/FarmUpdate.php
Rebuild farmOS configuration.

File

modules/core/update/src/FarmUpdate.php, line 132

Class

FarmUpdate
Farm update service.

Namespace

Drupal\farm_update

Code

protected function getExcludedItems() {

  // Ask modules for config exclusions.
  $exclude_config = $this->moduleHandler
    ->invokeAll('farm_update_exclude_config');

  // Load farm_update.settings to get additional exclusions.
  $settings_exclude_config = \Drupal::config('farm_update.settings')
    ->get('exclude_config');
  if (!empty($settings_exclude_config)) {
    $exclude_config = array_merge($exclude_config, $settings_exclude_config);
  }

  // Always exclude this module's configuration.
  // This isn't strictly necessary because we don't provide default config
  // in config/install. But in the unlikely event that a custom module does
  // provide this config, and then it is somehow overridden by another means,
  // it would be reverted. So we exclude it here just to be extra safe.
  $exclude_config[] = 'farm_update.settings';
  return $exclude_config;
}