Browse Source

Add the page parameter to the islandora_tabs hook call.

...  Facilitates implementation of equivalent functionality, where
the object was instantiated with the PID, and then the page was
passed to the method declared in your ISLANDORACM stream.
pull/126/head
Adam Vessey 13 years ago committed by Adam Vessey
parent
commit
c01495947a
  1. 8
      CollectionClass.inc
  2. 2
      ObjectHelper.inc
  3. 2
      fedora_repository.module

8
CollectionClass.inc

@ -28,11 +28,9 @@ class CollectionClass {
* @return CollectionClass * @return CollectionClass
*/ */
function __construct($pid = NULL) { function __construct($pid = NULL) {
if (!empty($pid)) { module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $this->collectionObject = new ObjectHelper();
$this->collectionObject = new ObjectHelper($pid); $this->pid = $pid;
$this->pid = $pid;
}
} }
public static function getCollectionQuery($pid) { public static function getCollectionQuery($pid) {

2
ObjectHelper.inc

@ -32,8 +32,6 @@ class ObjectHelper {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
$connectionHelper = new ConnectionHelper(); $connectionHelper = new ConnectionHelper();
//$this->fedoraUser = $connectionHelper->getUser();
//$this->fedoraPass = $connectionHelper->getPassword();
} }
/** /**

2
fedora_repository.module

@ -1071,7 +1071,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$object_details = array(); $object_details = array();
} }
$hook_tabs = module_invoke_all('islandora_tabs', $content_models, $pid); $hook_tabs = module_invoke_all('islandora_tabs', $content_models, $pid, $page_number);
$cmodels_tabs = array_merge($cmodels_tabs, $object_details, $hook_tabs); $cmodels_tabs = array_merge($cmodels_tabs, $object_details, $hook_tabs);
return tabs_render($cmodels_tabs); return tabs_render($cmodels_tabs);

Loading…
Cancel
Save