1 layout.api.php | hook_layout_disable(Layout $layout) |
Respond to a layout being disabled.
This hook is invoked from Layout::disable() after a layout has been disabled. A layout configuration may be disabled by a user from the administrative list of layouts. A disabled layout will not affect pages at its configured path, but will retain its configuration so that it may be enabled later.
Parameters
Layout $layout: The layout object that was disabled.
See also
Related topics
File
- core/
modules/ layout/ layout.api.php, line 312 - Describe hooks provided by the Layout module.
Code
function hook_layout_disable(Layout $layout) {
if ($layout->getPath() == 'my_path') {
my_custom_function();
}
}