Skip to content
Snippets Groups Projects
Commit 3a51a65e authored by Eric Bremner's avatar Eric Bremner Committed by Kevin Paxman
Browse files

ISTWCMS-5880: adding logic to get out contact media

parent 8a73903d
No related branches found
No related tags found
3 merge requests!284Feature/istwcms 5880 ebremner banners above,!274Draft: ISTWCMS-5551: fixing office hours display,!260Feature/istwcms 5668 a5kulkar rename references to publications
...@@ -255,6 +255,7 @@ class UWService implements UWServiceInterface { ...@@ -255,6 +255,7 @@ class UWService implements UWServiceInterface {
// Set the defaults for the flags to false. // Set the defaults for the flags to false.
$media_flags['has_media'] = FALSE; $media_flags['has_media'] = FALSE;
$media_flags['show_header_in_media'] = FALSE; $media_flags['show_header_in_media'] = FALSE;
$media_flags['has_portrait'] = FALSE;
// If there is a type of media field, continue to look // If there is a type of media field, continue to look
// for media flags. // for media flags.
...@@ -273,13 +274,14 @@ class UWService implements UWServiceInterface { ...@@ -273,13 +274,14 @@ class UWService implements UWServiceInterface {
$media_flags['show_header_in_media'] = TRUE; $media_flags['show_header_in_media'] = TRUE;
} }
} }
// Special case is contact, we need to look if there // Special case is contact, we need to look if there
// is a portrait image and if so set the has_media. // is a portrait image and if so set the has_media.
elseif ($node->getType() == 'uw_ct_contact') { if ($node->getType() == 'uw_ct_contact') {
// If there is a portrait image, set the has_media. // If there is a portrait image, set the has_media.
if ($node->field_uw_ct_contact_image->getValue()) { if ($node->field_uw_ct_contact_image->getValue()) {
$media_flags['has_media'] = TRUE; $media_flags['has_portrait'] = TRUE;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment