From 5b43a91ed219445acb8a7fe37f56ffa1b3ff16a6 Mon Sep 17 00:00:00 2001 From: Killesreiter Volker Date: Thu, 20 Jun 2024 13:41:26 +0200 Subject: [PATCH] add update hook --- ...ost_update_0003_remove_blazy_and_slick.yml | 615 ++++++++++++++++++ thunder.post_update.php | 14 + updates_checklist.yml | 6 + 3 files changed, 635 insertions(+) create mode 100644 config/update/thunder_post_update_0003_remove_blazy_and_slick.yml diff --git a/config/update/thunder_post_update_0003_remove_blazy_and_slick.yml b/config/update/thunder_post_update_0003_remove_blazy_and_slick.yml new file mode 100644 index 000000000..31adc48fb --- /dev/null +++ b/config/update/thunder_post_update_0003_remove_blazy_and_slick.yml @@ -0,0 +1,615 @@ +diff.settings: + expected_config: + general_settings: + layout_plugins: + visual_inline: + enabled: true + update_actions: + change: + general_settings: + layout_plugins: + visual_inline: + enabled: false +filter.format.basic_html: + expected_config: + filters: + blazy_filter: + id: blazy_filter + provider: blazy + settings: + box_caption: '' + box_media_style: '' + box_style: '' + filter_tags: + iframe: iframe + img: img + hybrid_style: '' + media_switch: '' + use_data_uri: '0' + status: false + weight: 3 + slick_filter: + id: slick_filter + provider: slick + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + image_style: '' + layout: '' + loading: '' + media_switch: '' + optionset: default + optionset_thumbnail: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + skin: '' + skin_thumbnail: '' + style: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + visible_items: null + status: false + weight: 4 + update_actions: + delete: + filters: + blazy_filter: + id: blazy_filter + provider: blazy + settings: + box_caption: '' + box_media_style: '' + box_style: '' + filter_tags: + iframe: iframe + img: img + hybrid_style: '' + media_switch: '' + use_data_uri: '0' + status: false + weight: 3 + slick_filter: + id: slick_filter + provider: slick + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + image_style: '' + layout: '' + loading: '' + media_switch: '' + optionset: default + optionset_thumbnail: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + skin: '' + skin_thumbnail: '' + style: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + visible_items: null + status: false + weight: 4 +filter.format.full_html: + expected_config: + filters: + blazy_filter: + id: blazy_filter + provider: blazy + settings: + box_caption: '' + box_media_style: '' + box_style: '' + filter_tags: + iframe: iframe + img: img + hybrid_style: '' + media_switch: '' + use_data_uri: '0' + status: false + weight: 3 + slick_filter: + id: slick_filter + provider: slick + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + image_style: '' + layout: '' + loading: '' + media_switch: '' + optionset: default + optionset_thumbnail: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + skin: '' + skin_thumbnail: '' + style: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + visible_items: null + status: false + weight: 4 + update_actions: + delete: + filters: + blazy_filter: + id: blazy_filter + provider: blazy + settings: + box_caption: '' + box_media_style: '' + box_style: '' + filter_tags: + iframe: iframe + img: img + hybrid_style: '' + media_switch: '' + use_data_uri: '0' + status: false + weight: 3 + slick_filter: + id: slick_filter + provider: slick + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + image_style: '' + layout: '' + loading: '' + media_switch: '' + optionset: default + optionset_thumbnail: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + skin: '' + skin_thumbnail: '' + style: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + visible_items: null + status: false + weight: 4 +filter.format.restricted_html: + expected_config: + filters: + blazy_filter: + id: blazy_filter + provider: blazy + settings: + box_caption: '' + box_media_style: '' + box_style: '' + filter_tags: + iframe: iframe + img: img + hybrid_style: '' + media_switch: '' + use_data_uri: '0' + status: false + weight: 3 + slick_filter: + id: slick_filter + provider: slick + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + image_style: '' + layout: '' + loading: '' + media_switch: '' + optionset: default + optionset_thumbnail: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + skin: '' + skin_thumbnail: '' + style: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + visible_items: null + status: false + weight: 4 + update_actions: + delete: + filters: + blazy_filter: + id: blazy_filter + provider: blazy + settings: + box_caption: '' + box_media_style: '' + box_style: '' + filter_tags: + iframe: iframe + img: img + hybrid_style: '' + media_switch: '' + use_data_uri: '0' + status: false + weight: 3 + slick_filter: + id: slick_filter + provider: slick + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + image_style: '' + layout: '' + loading: '' + media_switch: '' + optionset: default + optionset_thumbnail: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + skin: '' + skin_thumbnail: '' + style: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + visible_items: null + status: false + weight: 4 +core.entity_view_display.media.gallery.default: + expected_config: + content: + field_media_images: + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + breakpoints: + lg: + image_style: '' + width: '' + md: + image_style: '' + width: '' + sm: + image_style: '' + width: '' + xl: + image_style: '' + width: '' + xs: + image_style: '' + width: '' + cache: 0 + caption: + field_copyright: field_copyright + field_description: '0' + field_expires: '0' + field_image: '0' + field_tags: '0' + class: '' + current_view_mode: default + fx: '' + grid: '0' + grid_header: '' + grid_medium: '0' + grid_small: '0' + icon: '' + id: '' + image: '' + image_style: gallery + layout: below + link: '' + media_switch: '' + optionset: thunder_gallery + optionset_thumbnail: '' + overlay: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + sizes: '' + skin: classic + skin_arrows: '' + skin_dots: '' + skin_thumbnail: '' + style: '' + thumbnail: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + title: field_description + use_theme_field: false + vanilla: true + view_mode: slick + visible_items: 0 + type: slick_media + weight: 0 + update_actions: + delete: + content: + field_media_images: + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + breakpoints: + lg: + image_style: '' + width: '' + md: + image_style: '' + width: '' + sm: + image_style: '' + width: '' + xl: + image_style: '' + width: '' + xs: + image_style: '' + width: '' + cache: 0 + caption: + field_copyright: field_copyright + field_description: '0' + field_expires: '0' + field_image: '0' + field_tags: '0' + class: '' + current_view_mode: default + fx: '' + grid: '0' + grid_header: '' + grid_medium: '0' + grid_small: '0' + icon: '' + id: '' + image: '' + image_style: gallery + layout: below + media_switch: '' + optionset: thunder_gallery + optionset_thumbnail: '' + overlay: '' + overridables: + arrows: '0' + autoplay: '0' + dots: '0' + draggable: '0' + infinite: '0' + mouseWheel: '0' + randomize: '0' + variableWidth: '0' + override: false + preserve_keys: false + ratio: '' + responsive_image_style: '' + sizes: '' + skin: classic + skin_arrows: '' + skin_dots: '' + skin_thumbnail: '' + style: '' + thumbnail: '' + thumbnail_caption: '' + thumbnail_effect: '' + thumbnail_position: '' + thumbnail_style: '' + title: field_description + use_theme_field: false + vanilla: true + visible_items: 0 + change: + content: + field_media_images: + settings: + link: false + view_mode: default + type: entity_reference_entity_view + weight: 1 +core.entity_view_display.media.image.default: + expected_config: + content: + field_image: + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + cache: 0 + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + layout: '' + lazy: '' + loading: '' + media_switch: '' + preload: false + ratio: '' + responsive_image_style: '' + skin: '' + style: '' + thumbnail_style: '' + view_mode: '' + type: blazy + update_actions: + delete: + content: + field_image: + settings: + background: false + box_caption: '' + box_caption_custom: '' + box_media_style: '' + box_style: '' + cache: 0 + caption: + alt: '0' + title: '0' + grid: '' + grid_medium: '' + grid_small: '' + layout: '' + lazy: '' + loading: '' + media_switch: '' + preload: false + ratio: '' + responsive_image_style: '' + skin: '' + style: '' + thumbnail_style: '' + view_mode: '' + change: + content: + field_image: + settings: + image_link: '' + image_loading: + attribute: lazy + type: image diff --git a/thunder.post_update.php b/thunder.post_update.php index d8e8af5f7..e86e29c7c 100644 --- a/thunder.post_update.php +++ b/thunder.post_update.php @@ -115,3 +115,17 @@ function thunder_post_update_0002_enable_paragraphs_split(array &$sandbox): stri // Output logged messages to related channel of update execution. return $updater->logger()->output(); } + +/** + * This update removes blazy and slick integration. + */ +function thunder_post_update_0003_remove_blazy_and_slick(): string { + /** @var \Drupal\update_helper\Updater $updater */ + $updater = \Drupal::service('update_helper.updater'); + + // Execute configuration update definitions with logging of success. + $updater->executeUpdate('thunder', 'thunder_post_update_0003_remove_blazy_and_slick'); + + // Output logged messages to related channel of update execution. + return $updater->logger()->output(); +} diff --git a/updates_checklist.yml b/updates_checklist.yml index 42d98b5db..bfdf38558 100644 --- a/updates_checklist.yml +++ b/updates_checklist.yml @@ -10,3 +10,9 @@ v7.2.2: thunder_post_update_0002_enable_paragraphs_split: '#title': 'Enable paragraphs split functionality.' '#description': '

This configuration update will update input formats and editors settings

' +v7.X.X: + '#title': 'Update to version v7.X.X' + '#description': '

Remove blazy and slick integration

' + thunder_post_update_0002_enable_paragraphs_split: + '#title': 'Remove blazy and slick integration.' + '#description': '

Remove configuration for blazy and slick modules

'