function simple_sitemap_update_8203 in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 simple_sitemap.install \simple_sitemap_update_8203()
- 4.x simple_sitemap.install \simple_sitemap_update_8203()
Splitting simple_sitemap.settings configuration into simple_sitemap.settings, simple_sitemap.entity_types and simple_sitemap.custom.
File
- ./
simple_sitemap.install, line 232 - Module install and update procedures.
Code
function simple_sitemap_update_8203() {
$old_config = $config = \Drupal::config('simple_sitemap.settings');
foreach ([
'entity_types',
'custom',
] as $config_name) {
if (!($config = $old_config
->get($config_name))) {
continue;
}
\Drupal::service('config.factory')
->getEditable("simple_sitemap.{$config_name}")
->setData($config)
->save();
}
$settings = $old_config
->get('settings');
\Drupal::service('config.factory')
->getEditable("simple_sitemap.settings")
->setData($settings)
->save();
}