Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/4.1.1'
Browse files Browse the repository at this point in the history
release/4.1.1
  • Loading branch information
MdNadimHossain committed Aug 14, 2024
2 parents 05d9740 + 73c1abb commit 35e527c
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 19 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"license": "GPL-2.0-or-later",
"require": {
"dpc-sdp/tide_core": "^4.0.0",
"dpc-sdp/tide_landing_page": "^4.0.0"
"dpc-sdp/tide_landing_page": "^4.0.0",
"dpc-sdp/tide_api": "^4.0.0",
"dpc-sdp/tide_search": "^4.0.0"
},
"repositories": {
"drupal": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,55 @@ langcode: en
status: true
dependencies:
config:
- field.field.paragraph.data_driven_component.field_configuration
- field.field.paragraph.data_driven_component.field_data_driven_component
- field.field.paragraph.data_driven_component.field_paragraph_body
- field.field.paragraph.data_driven_component.field_paragraph_title
- paragraphs.paragraphs_type.data_driven_component
module:
- content_moderation
- text
- tide_content_collection
id: paragraph.data_driven_component.default
targetEntityType: paragraph
bundle: data_driven_component
mode: default
content:
field_data_driven_component:
weight: 103
settings: { }
field_configuration:
type: content_collection_configuration_raw
weight: 2
region: content
settings:
schema_validation: '1'
rows: '5'
placeholder: ''
third_party_settings: { }
field_data_driven_component:
type: options_select
weight: 3
region: content
settings: { }
third_party_settings: { }
field_paragraph_body:
weight: 102
type: text_textarea
weight: 1
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
type: text_textarea
region: content
field_paragraph_title:
weight: 101
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
type: string_textfield
region: content
moderation_state:
type: moderation_state_default
weight: 100
settings: { }
region: content
settings: { }
third_party_settings: { }
hidden:
created: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,49 @@ langcode: en
status: true
dependencies:
config:
- field.field.paragraph.data_driven_component.field_configuration
- field.field.paragraph.data_driven_component.field_data_driven_component
- field.field.paragraph.data_driven_component.field_paragraph_body
- field.field.paragraph.data_driven_component.field_paragraph_title
- paragraphs.paragraphs_type.data_driven_component
module:
- options
- text
- tide_content_collection
id: paragraph.data_driven_component.default
targetEntityType: paragraph
bundle: data_driven_component
mode: default
content:
field_data_driven_component:
field_configuration:
type: content_collection_configuration_raw
label: above
settings:
raw_json: '1'
third_party_settings: { }
weight: 2
region: content
field_data_driven_component:
type: list_default
label: above
settings: { }
third_party_settings: { }
type: list_default
weight: 3
region: content
field_paragraph_body:
weight: 1
type: text_default
label: above
settings: { }
third_party_settings: { }
type: text_default
weight: 1
region: content
field_paragraph_title:
weight: 0
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
type: string
weight: 0
region: content
hidden: { }
hidden:
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_configuration
- paragraphs.paragraphs_type.data_driven_component
module:
- tide_content_collection
id: paragraph.data_driven_component.field_configuration
field_name: field_configuration
entity_type: paragraph
bundle: data_driven_component
label: Configuration
description: 'Field not to be used unless Front end dev work has been discussed and built.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: content_collection_configuration
25 changes: 25 additions & 0 deletions config/install/field.storage.paragraph.field_configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
langcode: en
status: true
dependencies:
module:
- field_permissions
- paragraphs
- tide_content_collection
third_party_settings:
field_permissions:
permission_type: public
id: paragraph.field_configuration
field_name: field_configuration
entity_type: paragraph
type: content_collection_configuration
settings:
index: node
schema: ''
case_sensitive: false
module: tide_content_collection
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
4 changes: 4 additions & 0 deletions tide_data_driven_component.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ package: Tide
core_version_requirement: ^9 || ^10
dependencies:
- dpc-sdp:tide_landing_page
- dpc-sdp:tide_api
- tide_api:tide_content_collection
config_devel:
install:
- core.entity_form_display.paragraph.data_driven_component.default.yml
- core.entity_view_display.paragraph.data_driven_component.default.yml
- field.field.paragraph.data_driven_component.field_configuration.yml
- field.field.paragraph.data_driven_component.field_data_driven_component.yml
- field.field.paragraph.data_driven_component.field_paragraph_body.yml
- field.field.paragraph.data_driven_component.field_paragraph_title.yml
- field.storage.paragraph.field_data_driven_component.yml
- paragraphs.paragraphs_type.data_driven_component.yml
- taxonomy.vocabulary.data_driven_component.yml
- field.storage.taxonomy_term.field_machine_name.yml
- field.storage.paragraph.field_configuration.yml
- field.field.taxonomy_term.data_driven_component.field_machine_name.yml
- core.entity_form_display.taxonomy_term.data_driven_component.default.yml
- core.entity_view_display.taxonomy_term.data_driven_component.default.yml
39 changes: 39 additions & 0 deletions tide_data_driven_component.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

/**
* @file
* Tide Data Driven Component module install file.
*/

/**
* Adds json text area field to data driven component.
*/
function tide_data_driven_component_update_10001() {
module_load_include('inc', 'tide_core', 'includes/helpers');
$config_location = [\Drupal::service('extension.list.module')->getPath('tide_data_driven_component') . '/config/install'];

$configs = [
'field.storage.paragraph.field_configuration' => 'field_storage_config',
'field.field.paragraph.data_driven_component.field_configuration' => 'field_config',
];
// Check if field already exported to config/sync.
foreach ($configs as $config => $type) {
$config_read = _tide_read_config($config, $config_location, TRUE);
$storage = \Drupal::entityTypeManager()->getStorage($type);
$config_entity = $storage->createFromStorageRecord($config_read);
$config_entity->save();
}

$form_configs = [
'core.entity_form_display.paragraph.data_driven_component.default',
'core.entity_view_display.paragraph.data_driven_component.default',
];
foreach ($form_configs as $form_config) {
$config = \Drupal::configFactory()->getEditable($form_config);
$config_read = _tide_read_config($form_config, $config_location, FALSE);
$config->set('dependencies', $config_read['dependencies']);
$config->set('content', $config_read['content']);
$config->set('hidden', $config_read['hidden']);
$config->save();
}
}

0 comments on commit 35e527c

Please sign in to comment.