function hierarchical_taxonomy_menu_update_8001 in Hierarchical Taxonomy Menu 8
Convert config values.
File
- ./
hierarchical_taxonomy_menu.install, line 11 - Installation file for Hierarchical Taxonomy Menu module.
Code
function hierarchical_taxonomy_menu_update_8001() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('block.block.hierarchicaltaxonomymenu') as $block_config_name) {
$block = $config_factory
->getEditable($block_config_name);
$settings = $block
->get('settings');
$settings['collapsible'] = (bool) $settings['collapsible'];
$settings['interactive_parent'] = (bool) $settings['interactive_parent'];
$settings['dynamic_base_term'] = (bool) $settings['dynamic_base_term'];
$block
->set('settings', $settings);
$block
->save();
}
}