From 51b2ca7b485d6e6c0dee13a1c2d61e8f5e419b6b Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Mon, 17 Oct 2022 09:19:42 -0400 Subject: [PATCH] ISTWCMS-5880: adding opportunity 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 38d5e60f..da15393a 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_opportunity', 'uw_ct_profile', 'uw_ct_project', 'uw_ct_service', diff --git a/src/Service/UwNodeContent.php b/src/Service/UwNodeContent.php index fb75d16f..80298550 100644 --- a/src/Service/UwNodeContent.php +++ b/src/Service/UwNodeContent.php @@ -833,6 +833,10 @@ class UwNodeContent { $content_data['content'] = $this->addToContentData('content', 'field_uw_opportunity_position'); } + if ($node_flags['get_media']) { + $content_data['media'] = $this->addToContentData('media', NULL); + } + return $content_data; } diff --git a/uw_cfg_common.module b/uw_cfg_common.module index 7ce56ccf..f18b8d4a 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', + 'opportunity', 'profile', 'project', 'service', -- GitLab