From 57dfab4b7180aad30fd993d867c8a56f632ecdb5 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Fri, 26 Jul 2024 10:58:17 -0700 Subject: [PATCH] Closes #3498 Make config dependencies, module dependencies in az_seo. (#3499) Co-authored-by: Joe Parsons <471936+joeparsons@users.noreply.github.com> --- modules/custom/az_seo/az_seo.info.yml | 4 ++++ modules/custom/az_seo/az_seo.install | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/modules/custom/az_seo/az_seo.info.yml b/modules/custom/az_seo/az_seo.info.yml index e06b602d3d..ffc1fcaa8f 100644 --- a/modules/custom/az_seo/az_seo.info.yml +++ b/modules/custom/az_seo/az_seo.info.yml @@ -3,6 +3,10 @@ type: module core_version_requirement: ^9 || ^10 package: The University of Arizona dependencies: + - az_news:az_news + - az_event:az_event + - az_person:az_person + - az_flexible_page:az_flexible_page - xmlsitemap:xmlsitemap - xmlsitemap:xmlsitemap_engines - redirect:redirect diff --git a/modules/custom/az_seo/az_seo.install b/modules/custom/az_seo/az_seo.install index 0ecc0d9ea8..5a24f66ff3 100644 --- a/modules/custom/az_seo/az_seo.install +++ b/modules/custom/az_seo/az_seo.install @@ -12,3 +12,21 @@ function az_seo_update_last_removed() { // Remove updates added before 2.6.0. return 9201; } + +/** + * Install az_news, az_person, az_event, az_flexible_page modules. + * + * Install modules that contain configuration dependencies. + * + * @see https://github.com/az-digital/az_quickstart/issues/3498 + * @see https://github.com/az-digital/az_quickstart/pull/3499 + */ +function az_seo_update_1021001() { + $modules_to_install = [ + 'az_news', + 'az_event', + 'az_person', + 'az_flexible_page', + ]; + \Drupal::service('module_installer')->install($modules_to_install); +}