From 61cc96d1bfb0ff236806f2921fc85dd001d483ff Mon Sep 17 00:00:00 2001 From: MorganDawe Date: Wed, 6 Jan 2016 16:10:36 -0400 Subject: [PATCH 1/2] Adding pid to object_mapper utility --- theme/theme.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theme/theme.inc b/theme/theme.inc index dea4a616..b865ff81 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -289,6 +289,7 @@ function islandora_objects_object_mapper($object_id) { 'link' => l($o->label, $url, $link_options), 'thumb' => l($img, $url, $link_options), 'description' => $description, + 'pid' => $o->id, ); } else { @@ -299,6 +300,7 @@ function islandora_objects_object_mapper($object_id) { 'link' => l(t('(Unknown)'), $url, $link_options), 'thumb' => '', 'description' => '', + 'pid' => $object_id, ); } } From d6afd6a1a1a26d5494a09f56f62b4b01110c9df5 Mon Sep 17 00:00:00 2001 From: Morgan Dawe Date: Wed, 6 Jan 2016 19:09:11 -0400 Subject: [PATCH 2/2] Update theme.inc Updated documentation to include the newly added 'pid' value in the returned associative array. --- theme/theme.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/theme/theme.inc b/theme/theme.inc index b865ff81..844c0719 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -257,6 +257,7 @@ function template_preprocess_islandora_objects(array &$variables) { * - link: A string containing a textual HTML link to the object. * - thumb: A string containing an image HTML link to the object. * - description: A string containing a description of the object. + * - pid: The object's PID. */ function islandora_objects_object_mapper($object_id) { $o = islandora_object_load($object_id);