Act on entity_bundle_rename().
This hook is invoked after the operation has been performed.
string $entity_type: The entity type to which the bundle is bound.
string $bundle_old: The previous name of the bundle.
string $bundle_new: The new name of the bundle.
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_entity_bundle_rename($entity_type, $bundle_old, $bundle_new) {
// Update the settings associated with the bundle in my_module.settings.
$config = config('my_module.settings');
$bundle_settings = $config
->get('bundle_settings');
if (isset($bundle_settings[$entity_type][$bundle_old])) {
$bundle_settings[$entity_type][$bundle_new] = $bundle_settings[$entity_type][$bundle_old];
unset($bundle_settings[$entity_type][$bundle_old]);
$config
->set('bundle_settings', $bundle_settings);
}
}