1 layout.api.php | hook_layout_delete(Layout $layout) |
Respond to a layout being deleted.
This hook is invoked from Layout::delete() after a layout has been deleted.
Parameters
Layout $layout: The layout object that was deleted.
Related topics
File
- core/
modules/ layout/ layout.api.php, line 271 - Describe hooks provided by the Layout module.
Code
function hook_layout_delete(Layout $layout) {
if ($layout->getPath() == 'my_path') {
my_custom_function();
}
}