class FieldLayoutTestHooks
Hook implementations for field_layout_test.
Hierarchy
- class \Drupal\field_layout_test\Hook\FieldLayoutTestHooks
Expanded class hierarchy of FieldLayoutTestHooks
File
-
core/
modules/ field_layout/ tests/ modules/ field_layout_test/ src/ Hook/ FieldLayoutTestHooks.php, line 12
Namespace
Drupal\field_layout_test\HookView source
class FieldLayoutTestHooks {
/**
* Implements hook_layout_alter().
*/
public function layoutAlter(&$definitions) : void {
/** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */
if (\Drupal::state()->get('field_layout_test.alter_regions') && isset($definitions['layout_onecol'])) {
$definitions['layout_onecol']->setRegions([
'foo' => [
'label' => 'Foo',
],
]);
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
FieldLayoutTestHooks::layoutAlter | public | function | Implements hook_layout_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.