Drupal modules for browsing and managing Fedora-based digital repositories.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
3.6 KiB

<?php
12 years ago
/**
* @file
* This file lists and documents all available hook functions to manipulate data.
*/
/**
* remove a datastream from a repository object
* @param object $fedora_object
* tuque FedoraObject
12 years ago
* @param string $datastream_id
*/
12 years ago
function hook_islandora_purge_datastream($fedora_object, $datastream_id) {}
/**
*
12 years ago
* @param type $object
* tuque FedoraObject
*/
12 years ago
function hook_islandora_purge_object($islandora_object) {}
/**
* allows modules to add to a repository objects display. If you implement this
12 years ago
* hook you should also register your module for view with the get types hook.
*
* islandora gets all displays back in an array and iterates over them. the order
* they are displayed is based on the order of the key of the array that each
* module returns.
12 years ago
*
* your module may also want to register a varible that says whether or not it
* should be part of the default display. Modules can also add secondary tabs as
12 years ago
* a way to add there output to an islandora display. the basic image module has
* samples of both (the secondary tabs examples are commented out)
12 years ago
*
* @param type $islandora_object
12 years ago
* tuque FedoraObject
*/
12 years ago
function hook_islandora_view_object($islandora_object) {}
/**
* returns an array listing object types provided by sub modules
* Ex. array($types['islandora:collectionCModel'][ISLANDORA_VIEW_HOOK] = variable_get('islandora_basic_collection_use_for_default_tab', TRUE);
* $types['islandora:collectionCModel'][ISLANDORA_EDIT_HOOK] = FALSE;
12 years ago
*
* @return array
*/
12 years ago
function hook_islandora_get_types() {}
/**
* allows modules to define an object edit page by cmodel
12 years ago
*
* your module should return true for ISLANDORA_EDIT_HOOK in its get_types function
12 years ago
*
* islandora provides a default implementation that should work for most use cases
* @param string $islandora_object
12 years ago
* @return string
*
*/
12 years ago
function hook_islandora_edit_object($islandora_object) {}
/**
* allows modules to alter the fedora object before it is pass through the edit
* hooks
12 years ago
* @param type $islandora_object
* a tugue FedoraObject
*/
function hook_islandora_edit_object_alter($islandora_object) {}
/**
12 years ago
* creates and populates a php Fedora object.
*/
12 years ago
function hook_islandora_preingest_alter() {}
/**
* modules can implement this hook to add or remove datastreams after an
12 years ago
* object has been ingested.
*
* Each module should check for the newly ingested repository objects content
* model to make sure it is a type of object they want to act on.
*
* @param type $islandora_object
* tugue FeodoraObject
*/
12 years ago
function hook_islandora_postingest($islandora_object) {}
/**
* Register potential ingest routes. Implementations should return an array containing possible routes.
* Ex. array(
* array('name' => t('Ingest Route Name'), 'url' => 'ingest_route/url', 'weight' => 0),
* );
*/
function hook_islandora_ingest_registry($collection_object) {}
/**
* Register a datastream edit route/form.
* @param $islandora_object
* @param $ds_id
*/
function hook_islandora_edit_datastream_registry($islandora_object, $ds_id) {}
/**
* alter an object before it gets used further down the stack
12 years ago
* @param type $object
* a tuque FedoraObject
*/
12 years ago
function hook_islandora_object_alter($fedora_object) {}
/**
12 years ago
* insert or remove rendered elements by implementing this function
* in your module
* @param type $arr
* an arr of rendered views
*/
12 years ago
function hook_islandora_display_alter($arr) {}
/**
*
* @param type $islandora_object
* a tuque FedoraObject
* @param array $content_models
12 years ago
* @param string $collection_pid
*/
12 years ago
function hook_islandora_ingest_pre_ingest($islandora_object, $content_models, $collection_pid) {}