Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Commits
6ffcf05e
Commit
6ffcf05e
authored
4 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4084: adding inverted L left layout
parent
63a79830
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Plugin/Layout/UwInvertedLLeftLayout.php
+38
-0
38 additions, 0 deletions
src/Plugin/Layout/UwInvertedLLeftLayout.php
uw_cfg_common.layouts.yml
+19
-1
19 additions, 1 deletion
uw_cfg_common.layouts.yml
with
57 additions
and
1 deletion
src/Plugin/Layout/UwInvertedLLeftLayout.php
0 → 100644
+
38
−
0
View file @
6ffcf05e
<?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
;
}
}
This diff is collapsed.
Click to expand it.
uw_cfg_common.layouts.yml
+
19
−
1
View file @
6ffcf05e
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment