@ -314,23 +324,25 @@ function islandora_edit_properties($object_id) {
}
/**
* builds a default page for the edit tab
* Builds a default page for the edit tab.
*
* @param object $fedora_object
* A tuque Fedora Object
*/
function islandora_islandora_edit_object($fedora_object) {
$supported_models = islandora_get_types();
$output = "";
foreach ($fedora_object->models as $model) {
if (isset($supported_models[$model][ISLANDORA_EDIT_HOOK]) && $supported_models[$model][ISLANDORA_EDIT_HOOK] == TRUE) {//another module is handling the view
drupal_alter('islandora_object', $fedora_object); //modify object if required before it is passed along
$arr = module_invoke_all('islandora_view_object', $fedora_object, $user, $page_number, $page_size); //allow submodules to decide how to handle content base on object type
if (empty($arr)) {
//TODO: make sure we iterate over the array as they will be more then one cmodel per object
drupal_set_message(t('there was an error loading the view for Islandora object "%s"', array('%s' => $fedora_object->label)), 'error');
return "";
// Accumulate the output.
$output = array();
// Call cmodel oriented variants first.
foreach (islandora_build_hook_list(ISLANDORA_VIEW_HOOK, $fedora_object->models) as $hook) {
* The default view hook. If there are no modules registered to handle this objects cmodels or there are
* If there are no modules registered to handle this objects cmodels or there are
* not any cmodels specified this will create a default display.
*
* @param string $object_id
* @return string
* @param FedoraObject $object
* The object whose display we are to render.
* @return array
*/
function islandora_islandora_view_object($object) {
$supported_models = islandora_get_types();
$output = "";
foreach ($object->models as $model) {
if (isset($supported_models[$model][ISLANDORA_VIEW_HOOK]) && (boolean) $supported_models[$model][ISLANDORA_VIEW_HOOK] === TRUE) { //another module is handling the view
return;
}
}
function islandora_default_islandora_view_object($object) {