function hook_layout_alter in Drupal 10
Same name and namespace in other branches
- 8 core/core.api.php \hook_layout_alter()
- 9 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().
2 invocations of hook_layout_alter()
- LayoutPluginManagerTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutPluginManagerTest.php - LayoutPluginManagerTest::testProcessDefinition in core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutPluginManagerTest.php - @covers ::processDefinition
File
- core/
core.api.php, line 2163 - Documentation landing page and topics, plus core library hooks.
Code
function hook_layout_alter(&$definitions) {
// Remove a layout.
unset($definitions['twocol']);
}