cfe95e137735cea9f5734457e1a78828374a6f11
[yaffs-website] / Layout / TestLayoutMainFooter.php
1 <?php
2
3 namespace Drupal\field_layout_test\Plugin\Layout;
4
5 use Drupal\Core\Layout\LayoutDefault;
6
7 /**
8  * Provides an annotated layout plugin for field_layout tests.
9  *
10  * @Layout(
11  *   id = "test_layout_main_and_footer",
12  *   label = @Translation("Test plugin: Main and Footer"),
13  *   category = @Translation("Layout test"),
14  *   description = @Translation("Test layout"),
15  *   regions = {
16  *     "main" = {
17  *       "label" = @Translation("Main Region")
18  *     },
19  *     "footer" = {
20  *       "label" = @Translation("Footer Region")
21  *     }
22  *   },
23  *   config_dependencies = {
24  *     "module" = {
25  *       "dependency_from_annotation",
26  *     },
27  *   },
28  * )
29  */
30 class TestLayoutMainFooter extends LayoutDefault {
31
32   /**
33    * {@inheritdoc}
34    */
35   public function defaultConfiguration() {
36     return [
37       'setting_1' => 'Default',
38     ];
39   }
40
41   /**
42    * {@inheritdoc}
43    */
44   public function calculateDependencies() {
45     $dependencies = parent::calculateDependencies();
46     $dependencies['module'][] = 'dependency_from_calculateDependencies';
47     return $dependencies;
48   }
49
50 }