|
|
@ -264,9 +264,6 @@ function islandora_view_object($object_id) { |
|
|
|
$page_number = (empty($_GET['page'])) ? '1' : $_GET['page']; |
|
|
|
$page_number = (empty($_GET['page'])) ? '1' : $_GET['page']; |
|
|
|
$page_size = (empty($_GET['pagesize'])) ? '10' : $_GET['pagesize']; |
|
|
|
$page_size = (empty($_GET['pagesize'])) ? '10' : $_GET['pagesize']; |
|
|
|
module_load_include('inc', 'islandora', 'RestConnection'); |
|
|
|
module_load_include('inc', 'islandora', 'RestConnection'); |
|
|
|
//$user = new stdClass(); |
|
|
|
|
|
|
|
//$user->name = 'fedoraAdmin'; |
|
|
|
|
|
|
|
//$user->password = 'islandora'; |
|
|
|
|
|
|
|
global $user; |
|
|
|
global $user; |
|
|
|
try { |
|
|
|
try { |
|
|
|
$restConnection = new RestConnection($user); |
|
|
|
$restConnection = new RestConnection($user); |
|
|
@ -283,7 +280,12 @@ function islandora_view_object($object_id) { |
|
|
|
return ""; |
|
|
|
return ""; |
|
|
|
} |
|
|
|
} |
|
|
|
//module_invoke_all(islandora_display($arr)), |
|
|
|
//module_invoke_all(islandora_display($arr)), |
|
|
|
return $arr[0]; //just an example as we could have more then one array element |
|
|
|
$output = ""; |
|
|
|
|
|
|
|
foreach($arr as $key => $value){ |
|
|
|
|
|
|
|
$output .= $key .'<br />'.$value; //ir we have multiple modules handle one cmodel we need to iterate over multiple |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//we could do another module invoke all here to build the edit tab with a default implemented in this module? |
|
|
|
|
|
|
|
return $output; //just an example as we could have more then one array element |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -296,8 +298,10 @@ function islandora_islandora_view_object($object){ |
|
|
|
$supported_models = islandora_get_types(); |
|
|
|
$supported_models = islandora_get_types(); |
|
|
|
$object_models = $object->models; |
|
|
|
$object_models = $object->models; |
|
|
|
$combined_list = array_intersect($supported_models, $object->models); |
|
|
|
$combined_list = array_intersect($supported_models, $object->models); |
|
|
|
|
|
|
|
$output = ""; |
|
|
|
if (empty($combined_list)) { |
|
|
|
if (empty($combined_list)) { |
|
|
|
return theme('islandora_default', array('islandora_object' => $object)); |
|
|
|
$output = theme('islandora_default', array('islandora_object' => $object)); |
|
|
|
|
|
|
|
return array ('Default Output' => $output); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|