From 545cc9d70898fb47254765ab8e4dbc6afa1c84fc Mon Sep 17 00:00:00 2001 From: Alan Stanley Date: Fri, 10 Jan 2014 14:15:41 -0400 Subject: [PATCH] added object for context in hook --- includes/breadcrumb.inc | 6 ++---- islandora.api.php | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/breadcrumb.inc b/includes/breadcrumb.inc index 05ab1bac..6f975ae3 100644 --- a/includes/breadcrumb.inc +++ b/includes/breadcrumb.inc @@ -28,7 +28,7 @@ function islandora_get_breadcrumbs($object) { $breadcrumbs = islandora_get_breadcrumbs_recursive($object->id, $object->repository); array_pop($breadcrumbs); $context = 'islandora'; - drupal_alter('islandora_breadcrumbs', $breadcrumbs, $context); + drupal_alter('islandora_breadcrumbs', $breadcrumbs, $context, $object); return $breadcrumbs; } @@ -114,9 +114,7 @@ function islandora_get_breadcrumbs_recursive($pid, FedoraRepository $repository, // render the last two links and break (on the next pass). return array_merge( islandora_get_breadcrumbs_recursive($root, $repository, $context), - array( - '...', - ) + array('...') ); } } diff --git a/islandora.api.php b/islandora.api.php index 04d8bd49..1aec1198 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -691,8 +691,10 @@ function hook_islandora_update_related_objects_properties(AbstractObject $object * Breadcrumbs array to be altered by reference. Each element is markup. * @param string $context * Where the alter is originating from for distinguishing. + * @param AbstractObject $object + * AbstractObject representing object providing breadcrumb path */ -function hook_islandora_breadcrumbs_alter(&$breadcrumbs, $context) { +function hook_islandora_breadcrumbs_alter(&$breadcrumbs, $context, $object) { }