Skip to content
Snippets Groups Projects
Commit 6ffcf05e authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4084: adding inverted L left layout

parent 63a79830
No related branches found
No related tags found
No related merge requests found
<?php
namespace Drupal\uw_cfg_common\Plugin\Layout;
use Drupal\Core\Form\FormStateInterface;
/**
* A UW Inverted L Left layout.
*/
class UwInvertedLLeftLayout extends UwColumnLayoutBase {
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
// Get the config for this layout.
$configuration = $this->getConfiguration();
// The options for the column widths.
$options = [
'even-split' => $this->t('Even split (50%, 50%)'),
'larger-left' => $this->t('Larger left (33%, 67%)'),
'larger-right' => $this->t('Larger right (67%, 33%)'),
];
// The form element for the column widths.
$form['layout_settings']['column_class'] = [
'#type' => 'select',
'#title' => $this->t('Column widths for top row'),
'#default_value' => !empty($configuration['column_class']) ? $configuration['column_class'] : 'even-split',
'#options' => $options,
];
return $form;
}
}
...@@ -89,4 +89,22 @@ uw_inverted_l_right: ...@@ -89,4 +89,22 @@ uw_inverted_l_right:
label: Fourth label: Fourth
icon_map: icon_map:
- [first, second, fourth] - [first, second, fourth]
- [third, third, fourth] - [third, third, fourth]
\ No newline at end of file uw_inverted_l_left:
label: 'Inverted "L" - left'
category: 'UW layouts'
class: '\Drupal\uw_cfg_common\Plugin\Layout\UwInvertedLLeftLayout'
template: uw_fdsu_theme_resp/templates/layout/layout--invertedlleft
default_region: first
regions:
first:
label: First
second:
label: Second
third:
label: Third
fourth:
label: Fourth
icon_map:
- [first, second, third]
- [first, fourth, fourth]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment