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

ISTWCMS-4084: adding inverted L right layout

parent 8ad139ae
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 Right layout.
*/
class UwInvertedLRightLayout 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;
}
}
...@@ -71,4 +71,22 @@ uw_five_column: ...@@ -71,4 +71,22 @@ uw_five_column:
fifth: fifth:
label: Fifth label: Fifth
icon_map: icon_map:
- [first, second, third, fourth, fifth] - [first, second, third, fourth, fifth]
\ No newline at end of file uw_inverted_l_right:
label: 'Inverted "L" - right'
category: 'UW layouts'
class: '\Drupal\uw_cfg_common\Plugin\Layout\UwInvertedLRightLayout'
template: uw_fdsu_theme_resp/templates/layout/layout--invertedlright
default_region: first
regions:
first:
label: First
second:
label: Second
third:
label: Third
fourth:
label: Fourth
icon_map:
- [first, second, fourth]
- [third, third, 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