Act on entity_bundle_delete().
This hook is invoked after the operation has been performed.
string $entity_type: The type of entity; for example, 'node' or 'user'.
string $bundle: The bundle that was just deleted.
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_delete($entity_type, $bundle) {
// Remove 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])) {
unset($bundle_settings[$entity_type][$bundle]);
$config
->set('bundle_settings', $bundle_settings);
}
}