Skip to content

Commit

Permalink
Issue #65: Add (Columns layout) variant for (Content row) paragraph t…
Browse files Browse the repository at this point in the history
…ype.
  • Loading branch information
msnassar committed Sep 5, 2019
1 parent 1712c38 commit 7b5524a
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 0 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ langcode: en
status: true
dependencies:
config:
- 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
Expand All @@ -12,6 +13,12 @@ targetEntityType: paragraph
bundle: oe_content_row
mode: default
content:
field_oe_content_row_layout:
weight: 1
settings: { }
third_party_settings: { }
type: options_select
region: content
field_oe_paragraphs:
weight: 0
settings:
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@ langcode: en
status: true
dependencies:
config:
- 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:
- entity_reference_revisions
- options
id: paragraph.oe_content_row.default
targetEntityType: paragraph
bundle: oe_content_row
mode: default
content:
field_oe_content_row_layout:
weight: 3
label: above
settings: { }
third_party_settings: { }
type: list_default
region: content
field_oe_paragraphs:
weight: 2
label: above
Expand Down
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
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: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
6 changes: 6 additions & 0 deletions oe_paragraphs.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
config_devel:
install:
# Form modes.
- core.entity_form_mode.paragraph.columns_layout
- core.entity_form_mode.paragraph.date
- core.entity_form_mode.paragraph.highlight
- core.entity_form_mode.paragraph.inpage_navigation
Expand Down Expand Up @@ -87,11 +88,13 @@ config_devel:
- paragraphs.paragraphs_type.oe_list_item_block

# Content row
- core.entity_form_display.paragraph.oe_content_row.columns_layout
- core.entity_form_display.paragraph.oe_content_row.default
- core.entity_form_display.paragraph.oe_content_row.inpage_navigation
- core.entity_view_display.paragraph.oe_content_row.default
- field.field.paragraph.oe_content_row.field_oe_paragraphs
- field.field.paragraph.oe_content_row.field_oe_title
- field.field.paragraph.oe_content_row.field_oe_content_row_layout
- paragraphs.paragraphs_type.oe_content_row

# Field types already included
Expand Down Expand Up @@ -130,6 +133,9 @@ config_devel:
# List item block layout
- field.storage.paragraph.field_oe_list_item_block_layout

# Content row layout
- field.storage.paragraph.field_oe_content_row_layout

optional:
# Paragraph multilingual configuration
- language.content_settings.paragraph.oe_accordion
Expand Down

0 comments on commit 7b5524a

Please sign in to comment.