-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 65 | Add new variant for the Content row type called "column Layout" #66
Open
msnassar
wants to merge
5
commits into
master
Choose a base branch
from
Issue-65
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7b5524a
Issue #65: Add (Columns layout) variant for (Content row) paragraph t…
msnassar 98d5c71
Issue #65: Add predefined list for content row layout field.
msnassar ef5842e
Issue #65: Allow developers to alter the allowed values for (Content …
msnassar 76d5a08
Issue #65: Change form display settings for (content row: column layo…
msnassar c877da6
Issue #65: Add upgrade path for column layout variant for content row…
msnassar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
config/install/core.entity_form_display.paragraph.oe_content_row.columns_layout.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- core.entity_form_mode.paragraph.columns_layout | ||
- field.field.paragraph.oe_content_row.field_oe_content_row_layout | ||
- field.field.paragraph.oe_content_row.field_oe_paragraphs | ||
- field.field.paragraph.oe_content_row.field_oe_title | ||
- paragraphs.paragraphs_type.oe_content_row | ||
module: | ||
- oe_paragraphs | ||
id: paragraph.oe_content_row.columns_layout | ||
targetEntityType: paragraph | ||
bundle: oe_content_row | ||
mode: columns_layout | ||
content: | ||
field_oe_content_row_layout: | ||
type: options_select | ||
weight: 0 | ||
region: content | ||
settings: { } | ||
third_party_settings: { } | ||
field_oe_paragraphs: | ||
weight: 1 | ||
settings: | ||
title: Paragraph | ||
title_plural: Paragraphs | ||
edit_mode: closed | ||
closed_mode: summary | ||
autocollapse: none | ||
closed_mode_threshold: 0 | ||
add_mode: dropdown | ||
form_display_mode: default | ||
default_paragraph_type: _none | ||
features: | ||
duplicate: duplicate | ||
collapse_edit_all: collapse_edit_all | ||
add_above: '0' | ||
third_party_settings: { } | ||
type: oe_paragraphs_variants | ||
region: content | ||
hidden: | ||
created: true | ||
field_oe_title: true | ||
status: true | ||
translation: true | ||
uid: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
config/install/core.entity_form_mode.paragraph.columns_layout.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- paragraphs | ||
id: paragraph.columns_layout | ||
label: 'Columns layout' | ||
targetEntityType: paragraph | ||
cache: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
config/install/field.field.paragraph.oe_content_row.field_oe_content_row_layout.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- field.storage.paragraph.field_oe_content_row_layout | ||
- paragraphs.paragraphs_type.oe_content_row | ||
module: | ||
- options | ||
id: paragraph.oe_content_row.field_oe_content_row_layout | ||
field_name: field_oe_content_row_layout | ||
entity_type: paragraph | ||
bundle: oe_content_row | ||
label: Layout | ||
description: 'Column layout for displaying content items. If none selected, the content will be displayed in one column.' | ||
required: false | ||
translatable: false | ||
default_value: { } | ||
default_value_callback: '' | ||
settings: { } | ||
field_type: list_string |
20 changes: 20 additions & 0 deletions
20
config/install/field.storage.paragraph.field_oe_content_row_layout.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- options | ||
- paragraphs | ||
id: paragraph.field_oe_content_row_layout | ||
field_name: field_oe_content_row_layout | ||
entity_type: paragraph | ||
type: list_string | ||
settings: | ||
allowed_values: { } | ||
allowed_values_function: _oe_paragraphs_allowed_values_content_row_column_layout | ||
module: options | ||
locked: false | ||
cardinality: 1 | ||
translatable: true | ||
indexes: { } | ||
persist_with_no_fields: false | ||
custom_storage: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Hooks for the OE Paragraphs module. | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
/** | ||
* Alters the allowed values for "Content row: Column layout". | ||
* | ||
* @param array $allowed_values | ||
* Array of possible key and value options. | ||
* | ||
* @see _oe_paragraphs_allowed_values_content_row_column_layout() | ||
*/ | ||
function hook_oe_paragraphs_allowed_values_content_row_column_layout_alter(array &$allowed_values) { | ||
$allowed_values = [ | ||
'2' => t('2 columns (equal width | 6-6)'), | ||
'6-3-3' => t('3 columns (non-equal width | 6-3-3)'), | ||
'4' => t('4 columns (equal width | 3-3-3-3)'), | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...olumn_layout_variant/core.entity_form_display.paragraph.oe_content_row.columns_layout.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- core.entity_form_mode.paragraph.columns_layout | ||
- field.field.paragraph.oe_content_row.field_oe_content_row_layout | ||
- field.field.paragraph.oe_content_row.field_oe_paragraphs | ||
- field.field.paragraph.oe_content_row.field_oe_title | ||
- paragraphs.paragraphs_type.oe_content_row | ||
module: | ||
- oe_paragraphs | ||
id: paragraph.oe_content_row.columns_layout | ||
targetEntityType: paragraph | ||
bundle: oe_content_row | ||
mode: columns_layout | ||
content: | ||
field_oe_content_row_layout: | ||
type: options_select | ||
weight: 0 | ||
region: content | ||
settings: { } | ||
third_party_settings: { } | ||
field_oe_paragraphs: | ||
weight: 1 | ||
settings: | ||
title: Paragraph | ||
title_plural: Paragraphs | ||
edit_mode: closed | ||
closed_mode: summary | ||
autocollapse: none | ||
closed_mode_threshold: 0 | ||
add_mode: dropdown | ||
form_display_mode: default | ||
default_paragraph_type: _none | ||
features: | ||
duplicate: duplicate | ||
collapse_edit_all: collapse_edit_all | ||
add_above: '0' | ||
third_party_settings: { } | ||
type: oe_paragraphs_variants | ||
region: content | ||
hidden: | ||
created: true | ||
field_oe_title: true | ||
status: true | ||
translation: true | ||
uid: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that better have validation of data provided by other modules.