Browse Source

Merge pull request #442 from ajstanley/7.x

added object for context in hook
pull/445/merge
Jordan Dukart 11 years ago
parent
commit
45389e66e4
  1. 6
      includes/breadcrumb.inc
  2. 4
      islandora.api.php

6
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('...')
);
}
}

4
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
* (Optional) AbstractObject representing object providing breadcrumb path
*/
function hook_islandora_breadcrumbs_alter(&$breadcrumbs, $context) {
function hook_islandora_breadcrumbs_alter(&$breadcrumbs, $context, $object = NULL) {
}

Loading…
Cancel
Save