From ea92fd819ef02087a2e6cd38ad0e00c497016a85 Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Mon, 17 Oct 2022 08:56:18 -0400 Subject: [PATCH] ISTWCMS-5880: adding project to media above --- src/Service/UWService.php | 1 + src/Service/UwNodeContent.php | 4 ++++ uw_cfg_common.module | 1 + 3 files changed, 6 insertions(+) diff --git a/src/Service/UWService.php b/src/Service/UWService.php index 8b9426e7..5a0c6bd3 100644 --- a/src/Service/UWService.php +++ b/src/Service/UWService.php @@ -234,6 +234,7 @@ class UWService implements UWServiceInterface { 'uw_ct_catalog_item', 'uw_ct_event', 'uw_ct_news_item', + 'uw_ct_project', 'uw_ct_service', 'uw_ct_web_page', ]; diff --git a/src/Service/UwNodeContent.php b/src/Service/UwNodeContent.php index 108c902a..6e27ef51 100644 --- a/src/Service/UwNodeContent.php +++ b/src/Service/UwNodeContent.php @@ -675,6 +675,10 @@ class UwNodeContent { $content_data['content'] = $this->addToContentData('content', 'field_uw_project_summary'); } + if ($node_flags['get_media']) { + $content_data['media'] = $this->addToContentData('media', NULL); + } + // Get listing image. if ($node_flags['get_image']) { $content_data['image'] = $this->addToContentData('image', 'field_uw_project_listing_image'); diff --git a/uw_cfg_common.module b/uw_cfg_common.module index 7e28b393..3e31f267 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -901,6 +901,7 @@ function uw_cfg_common_form_alter(array &$form, FormStateInterface $form_state, $remove_hero_image_nodes = [ 'web_page', 'catalog', + 'project', 'service', ]; -- GitLab