From 492e126fa128450a3d60b0203f8390fb446b44a0 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Thu, 6 Oct 2022 10:47:24 -0400 Subject: [PATCH 1/6] ISTWCMS-5865: adding workflows config to install hook so that features is happy --- uw_cfg_common.install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/uw_cfg_common.install b/uw_cfg_common.install index 7ce88d6..bca7ef7 100644 --- a/uw_cfg_common.install +++ b/uw_cfg_common.install @@ -19,6 +19,16 @@ use Symfony\Component\Yaml\Yaml; */ function uw_cfg_common_install() { + // ISTWCMS-5865: this the attempt to fix features for our build. + // Moving the actual installing of workflows to here, so that + // we can include workflows as a dependency in our modules and + // that it will allow new site installs. + $name = 'workflows.workflow.uw_workflow'; + $path = \Drupal::service('extension.list.module')->getPath('uw_cfg_common') . '/config/custom/'; + $source = new FileStorage($path); + $active_storage = \Drupal::service('config.storage'); + $active_storage->write($name, $source->read($name)); + // Get the role ids for UW roles. $uw_rids = UwRoles::getUwRoleIds(); -- GitLab From 2fa90fbd2a3a83a11591735bd67969ad19b29237 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Thu, 6 Oct 2022 11:44:25 -0400 Subject: [PATCH 2/6] ISTWCMS-5865: adding workflows yml file --- .../custom/workflows.workflow.uw_workflow.yml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 config/custom/workflows.workflow.uw_workflow.yml diff --git a/config/custom/workflows.workflow.uw_workflow.yml b/config/custom/workflows.workflow.uw_workflow.yml new file mode 100644 index 0000000..bde9c4e --- /dev/null +++ b/config/custom/workflows.workflow.uw_workflow.yml @@ -0,0 +1,106 @@ +langcode: en +status: true +dependencies: + config: + - node.type.uw_ct_blog + - node.type.uw_ct_catalog_item + - node.type.uw_ct_contact + - node.type.uw_ct_event + - node.type.uw_ct_expand_collapse_group + - node.type.uw_ct_news_item + - node.type.uw_ct_opportunity + - node.type.uw_ct_profile + - node.type.uw_ct_service + - node.type.uw_ct_sidebar + - node.type.uw_ct_site_footer + - node.type.uw_ct_web_page + module: + - content_moderation +id: uw_workflow +label: 'UW workflow' +type: content_moderation +type_settings: + states: + draft: + label: Draft + weight: -10 + published: false + default_revision: false + published: + label: Published + weight: -10 + published: true + default_revision: true + uw_wf_archived: + label: Archived + weight: -10 + published: false + default_revision: true + uw_wf_needs_review: + label: 'Needs Review' + weight: -10 + published: false + default_revision: false + uw_wf_unpublished: + label: Unpublished + weight: 0 + published: false + default_revision: true + transitions: + archived: + label: Archive + from: + - draft + - published + - uw_wf_archived + - uw_wf_needs_review + to: uw_wf_archived + weight: 3 + draft: + label: 'Create draft' + from: + - draft + - published + - uw_wf_archived + - uw_wf_needs_review + to: draft + weight: 0 + needs_review: + label: 'Submit for review' + from: + - draft + - published + - uw_wf_archived + - uw_wf_needs_review + to: uw_wf_needs_review + weight: 1 + published: + label: Publish + from: + - draft + - published + - uw_wf_archived + - uw_wf_needs_review + to: published + weight: 2 + unpublish: + label: Unpublish + from: + - uw_wf_unpublished + to: draft + weight: 4 + entity_types: + node: + - uw_ct_blog + - uw_ct_catalog_item + - uw_ct_contact + - uw_ct_event + - uw_ct_expand_collapse_group + - uw_ct_news_item + - uw_ct_opportunity + - uw_ct_profile + - uw_ct_service + - uw_ct_sidebar + - uw_ct_site_footer + - uw_ct_web_page + default_moderation_state: draft -- GitLab From ad1bb76d3a1fbb9869b6a20f33779b243a568048 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 12 Oct 2022 10:31:31 -0400 Subject: [PATCH 3/6] ISTWCMS-5865: more changes to make features happy --- .../layout_builder_styles.style.uw_lbs_carousel_1_item.yml | 1 - .../layout_builder_styles.style.uw_lbs_carousel_2_items.yml | 1 - .../layout_builder_styles.style.uw_lbs_carousel_3_items.yml | 1 - .../layout_builder_styles.style.uw_lbs_carousel_4_items.yml | 1 - .../layout_builder_styles.style.uw_lbs_contained_width.yml | 1 - ...layout_builder_styles.style.uw_lbs_contained_width_narrow.yml | 1 - .../layout_builder_styles.style.uw_lbs_contained_width_wide.yml | 1 - config/install/layout_builder_styles.style.uw_lbs_full_width.yml | 1 - 8 files changed, 8 deletions(-) diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml index 3d18660..81b005f 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml @@ -5,7 +5,6 @@ id: uw_lbs_carousel_1_item label: 'Carousel - 1 item' classes: uw-carousel--one-item type: component -group: default weight: -10 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml index 21076bf..a438e8b 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml @@ -5,7 +5,6 @@ id: uw_lbs_carousel_2_items label: 'Carousel - 2 items' classes: uw-carousel--two-items type: component -group: default weight: -9 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml index a4e3440..973fc63 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml @@ -5,7 +5,6 @@ id: uw_lbs_carousel_3_items label: 'Carousel - 3 items' classes: uw-carousel--three-items type: component -group: default weight: -8 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml index 3576c28..985bf7d 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml @@ -5,7 +5,6 @@ id: uw_lbs_carousel_4_items label: 'Carousel - 4 items' classes: uw-carousel--four-items type: component -group: default weight: -7 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml b/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml index d68c387..916c632 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml @@ -5,7 +5,6 @@ id: uw_lbs_contained_width label: 'Extra-wide contained width' classes: uw-contained-width type: section -group: default weight: -4 block_restrictions: - 'inline_block:uw_cbl_call_to_action' diff --git a/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml b/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml index c120b5b..68c56dc 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml @@ -5,7 +5,6 @@ id: uw_lbs_contained_width_narrow label: 'Narrow contained width' classes: "uw-contained-width\r\nuw-contained-width--narrow" type: section -group: default weight: -6 block_restrictions: { } layout_restrictions: { } diff --git a/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml b/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml index 7f62da9..7303b56 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml @@ -5,7 +5,6 @@ id: uw_lbs_contained_width_wide label: 'Wide contained width' classes: "uw-contained-width\r\nuw-contained-width--wide" type: section -group: default weight: -5 block_restrictions: { } layout_restrictions: { } diff --git a/config/install/layout_builder_styles.style.uw_lbs_full_width.yml b/config/install/layout_builder_styles.style.uw_lbs_full_width.yml index 461e8dd..43689e4 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_full_width.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_full_width.yml @@ -5,7 +5,6 @@ id: uw_lbs_full_width label: 'Full width' classes: uw-full-width type: section -group: default weight: -3 block_restrictions: - 'inline_block:uw_cbl_call_to_action' -- GitLab From 1b342104421539660e2209a82bbce856ab629813 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 12 Oct 2022 14:26:56 -0400 Subject: [PATCH 4/6] ISTWCMS-5865: still trying to make features happy --- .../layout_builder_styles.style.uw_lbs_carousel_1_item.yml | 1 + .../layout_builder_styles.style.uw_lbs_carousel_2_items.yml | 1 + .../layout_builder_styles.style.uw_lbs_carousel_3_items.yml | 1 + .../layout_builder_styles.style.uw_lbs_carousel_4_items.yml | 1 + .../layout_builder_styles.style.uw_lbs_contained_width.yml | 1 + ...layout_builder_styles.style.uw_lbs_contained_width_narrow.yml | 1 + .../layout_builder_styles.style.uw_lbs_contained_width_wide.yml | 1 + config/install/layout_builder_styles.style.uw_lbs_full_width.yml | 1 + 8 files changed, 8 insertions(+) diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml index 81b005f..ace0bf2 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_1_item.yml @@ -5,6 +5,7 @@ id: uw_lbs_carousel_1_item label: 'Carousel - 1 item' classes: uw-carousel--one-item type: component +group: null weight: -10 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml index a438e8b..87d18f3 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_2_items.yml @@ -5,6 +5,7 @@ id: uw_lbs_carousel_2_items label: 'Carousel - 2 items' classes: uw-carousel--two-items type: component +group: null weight: -9 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml index 973fc63..3f04717 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_3_items.yml @@ -5,6 +5,7 @@ id: uw_lbs_carousel_3_items label: 'Carousel - 3 items' classes: uw-carousel--three-items type: component +group: null weight: -8 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml b/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml index 985bf7d..550699c 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_carousel_4_items.yml @@ -5,6 +5,7 @@ id: uw_lbs_carousel_4_items label: 'Carousel - 4 items' classes: uw-carousel--four-items type: component +group: null weight: -7 block_restrictions: - 'inline_block:uw_cbl_facts_and_figures' diff --git a/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml b/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml index 916c632..9612387 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_contained_width.yml @@ -5,6 +5,7 @@ id: uw_lbs_contained_width label: 'Extra-wide contained width' classes: uw-contained-width type: section +group: null weight: -4 block_restrictions: - 'inline_block:uw_cbl_call_to_action' diff --git a/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml b/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml index 68c56dc..62063e3 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_contained_width_narrow.yml @@ -5,6 +5,7 @@ id: uw_lbs_contained_width_narrow label: 'Narrow contained width' classes: "uw-contained-width\r\nuw-contained-width--narrow" type: section +group: null weight: -6 block_restrictions: { } layout_restrictions: { } diff --git a/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml b/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml index 7303b56..c286b01 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_contained_width_wide.yml @@ -5,6 +5,7 @@ id: uw_lbs_contained_width_wide label: 'Wide contained width' classes: "uw-contained-width\r\nuw-contained-width--wide" type: section +group: null weight: -5 block_restrictions: { } layout_restrictions: { } diff --git a/config/install/layout_builder_styles.style.uw_lbs_full_width.yml b/config/install/layout_builder_styles.style.uw_lbs_full_width.yml index 43689e4..4aab26a 100644 --- a/config/install/layout_builder_styles.style.uw_lbs_full_width.yml +++ b/config/install/layout_builder_styles.style.uw_lbs_full_width.yml @@ -5,6 +5,7 @@ id: uw_lbs_full_width label: 'Full width' classes: uw-full-width type: section +group: null weight: -3 block_restrictions: - 'inline_block:uw_cbl_call_to_action' -- GitLab From 028a415f0a24449ec7017e0afa08971c15b0371a Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Thu, 13 Oct 2022 15:16:07 -0400 Subject: [PATCH 5/6] ISTWCMS-5865: adding project to workflows --- config/custom/workflows.workflow.uw_workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/custom/workflows.workflow.uw_workflow.yml b/config/custom/workflows.workflow.uw_workflow.yml index bde9c4e..9351d03 100644 --- a/config/custom/workflows.workflow.uw_workflow.yml +++ b/config/custom/workflows.workflow.uw_workflow.yml @@ -10,6 +10,7 @@ dependencies: - node.type.uw_ct_news_item - node.type.uw_ct_opportunity - node.type.uw_ct_profile + - node.type.uw_ct_project - node.type.uw_ct_service - node.type.uw_ct_sidebar - node.type.uw_ct_site_footer @@ -99,6 +100,7 @@ type_settings: - uw_ct_news_item - uw_ct_opportunity - uw_ct_profile + - uw_ct_project - uw_ct_service - uw_ct_sidebar - uw_ct_site_footer -- GitLab From 9573cc3a2ac4537a444cd935de0e7ad4a7ee866b Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Thu, 13 Oct 2022 15:28:06 -0400 Subject: [PATCH 6/6] ISTWCMS-5865: adding update hook to make features happy --- uw_cfg_common.install | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/uw_cfg_common.install b/uw_cfg_common.install index bca7ef7..415955e 100644 --- a/uw_cfg_common.install +++ b/uw_cfg_common.install @@ -447,3 +447,14 @@ function uw_cfg_common_update_9104(&$sandbox) { $service->removeMissingBlocksFromUnsaved(); $service->removeMissingBlocksFromSaved(); } + +/** + * Feature revert for workflows. + */ +function uw_cfg_common_update_9105(&$sandbox) { + $name = 'workflows.workflow.uw_workflow'; + $path = \Drupal::service('extension.list.module')->getPath('uw_cfg_common') . '/config/custom/'; + $source = new FileStorage($path); + $active_storage = \Drupal::service('config.storage'); + $active_storage->write($name, $source->read($name)); +} -- GitLab