diff --git a/config/custom/workflows.workflow.uw_workflow.yml b/config/custom/workflows.workflow.uw_workflow.yml new file mode 100644 index 0000000000000000000000000000000000000000..9351d03b49d35276e258ceda04866e67c221900c --- /dev/null +++ b/config/custom/workflows.workflow.uw_workflow.yml @@ -0,0 +1,108 @@ +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_project + - 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_project + - uw_ct_service + - uw_ct_sidebar + - uw_ct_site_footer + - uw_ct_web_page + default_moderation_state: draft 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 3d186603e944b62777ccd5c71512a4e51a280ebd..ace0bf2c6203ef8065e25ba2fec7e076cf1ea12b 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,7 @@ id: uw_lbs_carousel_1_item label: 'Carousel - 1 item' classes: uw-carousel--one-item type: component -group: default +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 21076bf74dbc4a32b5030a85b0daf0d717ea5aa8..87d18f379e7f91816a8562b5585d7a8fb69eaad7 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,7 @@ id: uw_lbs_carousel_2_items label: 'Carousel - 2 items' classes: uw-carousel--two-items type: component -group: default +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 a4e344077cf60c9b3f01283a48b8aa45950f3025..3f04717bdb03e8e565c0b2b82d670943e97198a9 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,7 @@ id: uw_lbs_carousel_3_items label: 'Carousel - 3 items' classes: uw-carousel--three-items type: component -group: default +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 3576c282101a33ec3cf7cf3e07e0a679e0c840ae..550699c51d43dc40a7c73d6228ffaf3cb935b7b3 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,7 @@ id: uw_lbs_carousel_4_items label: 'Carousel - 4 items' classes: uw-carousel--four-items type: component -group: default +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 d68c387a7e9a07b92e07db5cc9b03faf2f7dc59c..96123870d88295985a9e27d1d25674aa6b35cb14 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,7 @@ id: uw_lbs_contained_width label: 'Extra-wide contained width' classes: uw-contained-width type: section -group: default +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 c120b5b0db894e084df040c04f9e56f7bba3280a..62063e341f9645cab3f7d4a254a6db6136c6a9ea 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,7 @@ id: uw_lbs_contained_width_narrow label: 'Narrow contained width' classes: "uw-contained-width\r\nuw-contained-width--narrow" type: section -group: default +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 7f62da9ba08cf6ef030a7e45ae3bf7ea1376d374..c286b011aae5f9210c2c566062c43fb65242df7f 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,7 @@ id: uw_lbs_contained_width_wide label: 'Wide contained width' classes: "uw-contained-width\r\nuw-contained-width--wide" type: section -group: default +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 461e8dd108adf4514b9d0151ca25263fb0204d10..4aab26a7fba9e85596121af92c680ef6af44a075 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,7 @@ id: uw_lbs_full_width label: 'Full width' classes: uw-full-width type: section -group: default +group: null weight: -3 block_restrictions: - 'inline_block:uw_cbl_call_to_action' diff --git a/uw_cfg_common.install b/uw_cfg_common.install index 7ce88d6d19654769da8750093169901738297d0b..415955ed3678be51e918a3a6fbff55670585de22 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(); @@ -437,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)); +}