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

Commit

Permalink
deleted style field
Browse files Browse the repository at this point in the history
  • Loading branch information
yeniatencio committed Jul 29, 2024
1 parent b862316 commit 8421d00
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dependencies:
- entity_browser.browser.tide_image_browser
- field.field.paragraph.call_to_action.field_paragraph_body
- field.field.paragraph.call_to_action.field_paragraph_cta
- field.field.paragraph.call_to_action.field_paragraph_cta_style
- field.field.paragraph.call_to_action.field_paragraph_media
- field.field.paragraph.call_to_action.field_paragraph_title
- paragraphs.paragraphs_type.call_to_action
Expand Down Expand Up @@ -35,12 +34,6 @@ content:
third_party_settings: { }
type: link_default
region: content
field_paragraph_cta_style:
weight: 105
settings: { }
third_party_settings: { }
type: options_select
region: content
field_paragraph_media:
weight: 103
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ dependencies:
config:
- field.field.paragraph.call_to_action.field_paragraph_body
- field.field.paragraph.call_to_action.field_paragraph_cta
- field.field.paragraph.call_to_action.field_paragraph_cta_style
- field.field.paragraph.call_to_action.field_paragraph_media
- field.field.paragraph.call_to_action.field_paragraph_title
- paragraphs.paragraphs_type.call_to_action
module:
- link
- media
- options
- text
id: paragraph.call_to_action.default
targetEntityType: paragraph
Expand All @@ -37,13 +35,6 @@ content:
third_party_settings: { }
type: link
region: content
field_paragraph_cta_style:
weight: 4
label: above
settings: { }
third_party_settings: { }
type: list_default
region: content
field_paragraph_media:
weight: 2
label: above
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ id: call_to_action
label: 'Call to action'
icon_uuid: 239a823e-0af9-493b-bbeb-244632dd3876
icon_default: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzciIHZpZXdCb3g9IjAgMCA2OCA3NyIgZmlsb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NzAzIDI4LjM2ODRDMjguMTg2OCAyOC41NTI2IDI3Ljg3MjIgMjguNTI2MyAyNy43NDEyIDI4LjI4OTVMMjQuNTY5MiAyMy4wNTI2QzI0LjIyODUgMjIuNDczNyAyMy40MTU4IDIyLjQ3MzcgMjMuMDQ4OCAyMy4wMjYzTDE4LjE0NjcgMzAuNjA1M0MxNy43NTM1IDMxLjIxMDUgMTguMTk5MiAzMiAxOC45MDcgMzJaIiBmaWxsPSIjQTJBMkEyIi8+Cjwvc3ZnPgo='
description: 'Add a large card or banner with a prominent button to prompt users to take action.'
description: 'Add a banner with a prominent button to prompt users to take action.'
behavior_plugins: { }
Original file line number Diff line number Diff line change
Expand Up @@ -14,129 +14,165 @@ resourceFields:
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
uuid:
fieldName: uuid
publicName: uuid
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
revision_id:
fieldName: revision_id
publicName: revision_id
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
type:
fieldName: type
publicName: entity_type
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
langcode:
fieldName: langcode
publicName: langcode
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
uid:
fieldName: uid
publicName: uid
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
status:
fieldName: status
publicName: status
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
created:
fieldName: created
publicName: created
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
revision_uid:
fieldName: revision_uid
publicName: revision_uid
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
parent_id:
fieldName: parent_id
publicName: parent_id
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
parent_type:
fieldName: parent_type
publicName: parent_type
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
parent_field_name:
fieldName: parent_field_name
publicName: parent_field_name
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
behavior_settings:
fieldName: behavior_settings
publicName: behavior_settings
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
default_langcode:
fieldName: default_langcode
publicName: default_langcode
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
revision_default:
fieldName: revision_default
publicName: revision_default
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
revision_translation_affected:
fieldName: revision_translation_affected
publicName: revision_translation_affected
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
moderation_state:
fieldName: moderation_state
publicName: moderation_state
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
field_paragraph_body:
fieldName: field_paragraph_body
publicName: field_paragraph_body
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
field_paragraph_cta:
fieldName: field_paragraph_cta
publicName: field_paragraph_cta
enhancer:
id: link_enhancer
disabled: false
field_paragraph_cta_style:
fieldName: field_paragraph_cta_style
publicName: field_paragraph_cta_style
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
field_paragraph_media:
fieldName: field_paragraph_media
publicName: field_paragraph_media
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
field_paragraph_title:
fieldName: field_paragraph_title
publicName: field_paragraph_title
enhancer:
id: ''
disabled: false
advancedOptionsIcon: ''
enhancer_label: ''
2 changes: 0 additions & 2 deletions tide_landing_page.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ config_devel:
- field.field.paragraph.basic_text.field_paragraph_body
- field.field.paragraph.call_to_action.field_paragraph_body
- field.field.paragraph.call_to_action.field_paragraph_cta
- field.field.paragraph.call_to_action.field_paragraph_cta_style
- field.field.paragraph.call_to_action.field_paragraph_media
- field.field.paragraph.call_to_action.field_paragraph_title
- field.field.paragraph.card_event_auto.field_paragraph_cta_text
Expand Down Expand Up @@ -241,7 +240,6 @@ config_devel:
- field.storage.paragraph.field_paragraph_background_image
- field.storage.paragraph.field_paragraph_body
- field.storage.paragraph.field_paragraph_cta_card_event
- field.storage.paragraph.field_paragraph_cta_style
- field.storage.paragraph.field_paragraph_cta_text
- field.storage.paragraph.field_complex_image_data
- field.storage.paragraph.field_complex_image_data_label
Expand Down
33 changes: 33 additions & 0 deletions tide_landing_page.install
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,36 @@ function tide_landing_page_update_10101() {
\Drupal::moduleHandler()->loadInclude('tide_core', 'inc', 'includes/updates');
_tide_core_content_category_form_display('landing_page');
}

/**
* Remove style option field from call to action component.
*/
function solar_core_update_10102() {
// Delete field configuration manually.
$field_names = ['field_paragraph_cta_style'];
foreach ($field_names as $field_name) {
$field_config = FieldConfig::loadByName('paragraph', 'call_to_action', $field_name);
if ($field_config) {
$field_config->delete();
}

$field_storage_config = FieldStorageConfig::loadByName('paragraph', $field_name);
if ($field_storage_config) {
$field_storage_config->delete();
}
}

$form_configs = [
'core.entity_form_display.paragraph.call_to_action.default',
'core.entity_view_display.paragraph.call_to_action.default',
'paragraphs.paragraphs_type.call_to_action',
];
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 8421d00

Please sign in to comment.