1 layout.api.php hook_layout_enable(Layout $layout)

Respond to a layout being enabled.

This hook is invoked from Layout::enable() after a layout has been enabled.

Parameters

Layout $layout: The layout object that was enabled.

See also

hook_layout_disable()

Related topics

File

core/modules/layout/layout.api.php, line 290
Describe hooks provided by the Layout module.

Code

function hook_layout_enable(Layout $layout) {
  if ($layout->getPath() == 'my_path') {
    my_custom_function();
  }
}