diff --git a/src/Plugin/Layout/UwOneColumnLayout.php b/src/Plugin/Layout/UwOneColumnLayout.php new file mode 100644 index 0000000000000000000000000000000000000000..a78b1f7c0820bb3b784ca0b74a542c0d2a64f454 --- /dev/null +++ b/src/Plugin/Layout/UwOneColumnLayout.php @@ -0,0 +1,37 @@ +<?php + +namespace Drupal\uw_cfg_common\Plugin\Layout; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Layout\LayoutDefault; +use Drupal\Core\Plugin\PluginFormInterface; + +/** + * A UW one column layout. + * + * @Layout( + * id = "uw_one_column", + * label = @Translation("One column"), + * category = @Translation("UW layouts"), + * template = "templates/layout/layout--uwonecol", + * regions = { + * "first" = { + * "label" = @Translation("Column 1"), + * }, + * } + * ) + */ +class UwOneColumnLayout extends LayoutDefault implements PluginFormInterface { + + /** + * {@inheritdoc} + */ + public function build(array $regions) { + + // Build the render array as usual. + $build = parent::build($regions); + + return $build; + } + +} diff --git a/uw_cfg_common.layouts.yml b/uw_cfg_common.layouts.yml index cf54fc4f8eb6e96433fbb31013fa606c26ed2097..6c12d9ff3d9e60b35efaf3b6cbb6aa948288cd22 100644 --- a/uw_cfg_common.layouts.yml +++ b/uw_cfg_common.layouts.yml @@ -1,3 +1,14 @@ +uw_one_column: + label: 'UW One column' + category: 'UW layouts' + class: '\Drupal\uw_cfg_common\Plugin\Layout\UwOneColumnLayout' + template: uw_fdsu_theme_resp/templates/layout/layout--uwonecol + default_region: first + regions: + first: + label: One + icon_map: + - [first] uw_two_column: label: 'UW Two columns' category: 'UW layouts'