Allow additional config exclusions to be defined in farm_update.settings.
This commit is contained in:
parent
e36ac7a33f
commit
f881bea2e3
|
@ -0,0 +1,10 @@
|
|||
farm_update.settings:
|
||||
type: config_object
|
||||
label: 'farmOS Update settings'
|
||||
mapping:
|
||||
exclude_config:
|
||||
type: sequence
|
||||
label: 'Configuration items excluded from automatic updates'
|
||||
sequence:
|
||||
type: string
|
||||
label: 'Configuration item'
|
|
@ -118,6 +118,12 @@ class FarmUpdate implements FarmUpdateInterface {
|
|||
// 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);
|
||||
}
|
||||
|
||||
return $exclude_config;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue