|
|
|
@ -48,7 +48,11 @@ function islandora_basic_collection_theme($existing, $type, $theme, $path) {
|
|
|
|
|
* array of content model pids that this module supports |
|
|
|
|
*/ |
|
|
|
|
function islandora_basic_collection_islandora_get_types() { |
|
|
|
|
return array('info:fedora/islandora:collectionCModel'); |
|
|
|
|
$types = array(); |
|
|
|
|
$types['info:fedora/islandora:collectionCModel'][ISLANDORA_VIEW_HOOK] = TRUE; |
|
|
|
|
$types['info:fedora/islandora:collectionCModel'][ISLANDORA_EDIT_HOOK] = FALSE; |
|
|
|
|
return $types; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -66,13 +70,15 @@ function islandora_basic_collection_islandora_get_types() {
|
|
|
|
|
function islandora_basic_collection_islandora_view_object($object, $user, $page_number, $page_size) { |
|
|
|
|
//global $user; |
|
|
|
|
$cmodel_list = islandora_basic_collection_islandora_get_types(); |
|
|
|
|
$combined_list = array_intersect($cmodel_list, $object->models); |
|
|
|
|
if (empty($combined_list)) { |
|
|
|
|
return NULL; //we don't handle any of this objects cmodels |
|
|
|
|
} |
|
|
|
|
$models = $object->models; |
|
|
|
|
foreach ($object->models as $model) { |
|
|
|
|
if ($cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) { |
|
|
|
|
$output = theme('islandora_basic_collection', array('islandora_object' => $object)); |
|
|
|
|
return array('Basic Collection Output' => $output); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
@ -103,7 +109,6 @@ function islandora_basic_collection_preprocess_islandora_basic_collection(&$vari
|
|
|
|
|
if (isset($islandora_object['MEDIUM_SIZE'])) { |
|
|
|
|
$variables['islandora_medium_size_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/MEDIUM_SIZE/view'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function islandora_basic_collection_get_objects($object) { |
|
|
|
|