Version 1
[yaffs-website] / web / core / modules / field_layout / tests / modules / field_layout_test / field_layout_test.module
diff --git a/web/core/modules/field_layout/tests/modules/field_layout_test/field_layout_test.module b/web/core/modules/field_layout/tests/modules/field_layout_test/field_layout_test.module
new file mode 100644 (file)
index 0000000..6905c3d
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @file
+ * Contains hook implementations for field_layout_test.
+ */
+
+/**
+ * Implements hook_layout_alter().
+ */
+function field_layout_test_layout_alter(&$definitions) {
+  /** @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']]);
+  }
+}