1 config.api.php | hook_config_delete(Config $active_config) |
Respond to configuration deletion.
This may be used when modules need to clean up data that is no longer needed that is related to the configuration being deleted.
Parameters
Config $active_config: The configuration object for the settings being deleted.
Related topics
File
- core/
modules/ config/ config.api.php, line 203 - Documentation for hooks provided by Config module.
Code
function hook_config_delete(Config $active_config) {
if (strpos($active_config->getName(), 'image.style') === 0) {
$image_style_name = $active_config->get('name');
config('my_module.image_style_addons.' . $image_style_name)->delete();
}
}