function hook_layout_alter
Same name in other branches
- 9 core/core.api.php \hook_layout_alter()
- 8.9.x core/core.api.php \hook_layout_alter()
- 11.x core/core.api.php \hook_layout_alter()
Allow modules to alter layout plugin definitions.
Parameters
\Drupal\Core\Layout\LayoutDefinition[] $definitions: The array of layout definitions, keyed by plugin ID.
Related topics
2 functions implement hook_layout_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- field_layout_test_layout_alter in core/
modules/ field_layout/ tests/ modules/ field_layout_test/ field_layout_test.module - Implements hook_layout_alter().
- layout_builder_plugin_filter_layout_alter in core/
modules/ layout_builder/ layout_builder.module - Implements hook_plugin_filter_TYPE_alter().
File
-
core/
core.api.php, line 2182
Code
function hook_layout_alter(&$definitions) {
// Remove a layout.
unset($definitions['twocol']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.