@ -1,10 +1,8 @@
<?php
<?php
/**
/**
* @file
* @file
* This file documents all available hook functions to manipulate data.
* This file documents all available hook functions to manipulate data.
*/
*/
/**
/**
* Generate a repository objects view.
* Generate a repository objects view.
*
*
@ -28,15 +26,14 @@ function hook_islandora_view_object($object, $user, $page_number, $page_size) {
'title' => $object->label,
'title' => $object->label,
'path' => $resource_url,
'path' => $resource_url,
);
);
// Theme the image seperatly.
// Theme the image seperatly.
$variables['islandora_img'] = theme('image', $params);
$variables['islandora_img'] = theme('image', $params);
$output = theme('islandora_default_print', array(
$output = theme('islandora_default_print', array(
'islandora_content' => $variables['islandora_img']));
'islandora_content' => $variables['islandora_img']));
}
}
return $output;
return $output;
}
}
/**
/**
* Generate a print friendly page for the given object.
* Generate a print friendly page for the given object.
*
*
@ -44,7 +41,9 @@ function hook_islandora_view_object($object, $user, $page_number, $page_size) {
* The object form to print.
* The object form to print.
*/
*/
function hook_islandora_view_print_object($object) {
function hook_islandora_view_print_object($object) {
}
}
/**
/**
* Generate an object's display for the given content model.
* Generate an object's display for the given content model.
*
*
@ -58,8 +57,8 @@ function hook_islandora_view_print_object($object) {
* An array whose values are markup.
* An array whose values are markup.
*/
*/
function hook_cmodel_pid_islandora_view_object($object) {
function hook_cmodel_pid_islandora_view_object($object) {
}
}
/**
/**
* Alter display output after it has been generated.
* Alter display output after it has been generated.
@ -70,6 +69,7 @@ function hook_cmodel_pid_islandora_view_object($object) {
* The array of rendered views.
* The array of rendered views.
*/
*/
function hook_islandora_view_object_alter(& $object, & $rendered) {
function hook_islandora_view_object_alter(& $object, & $rendered) {
}
}
/**
/**
@ -83,6 +83,7 @@ function hook_islandora_view_object_alter(&$object, &$rendered) {
* The array of rendered views.
* The array of rendered views.
*/
*/
function hook_cmodel_pid_islandora_view_object_alter(& $object, & $rendered) {
function hook_cmodel_pid_islandora_view_object_alter(& $object, & $rendered) {
}
}
/**
/**
@ -95,6 +96,7 @@ function hook_cmodel_pid_islandora_view_object_alter(&$object, &$rendered) {
* An array whose values are markup.
* An array whose values are markup.
*/
*/
function hook_islandora_edit_object($object) {
function hook_islandora_edit_object($object) {
}
}
/**
/**
@ -110,6 +112,7 @@ function hook_islandora_edit_object($object) {
* An array whose values are markup.
* An array whose values are markup.
*/
*/
function hook_cmodel_pid_islandora_edit_object($object) {
function hook_cmodel_pid_islandora_edit_object($object) {
}
}
/**
/**
@ -121,6 +124,7 @@ function hook_cmodel_pid_islandora_edit_object($object) {
* an arr of rendered views
* an arr of rendered views
*/
*/
function hook_islandora_edit_object_alter(& $object, & $rendered) {
function hook_islandora_edit_object_alter(& $object, & $rendered) {
}
}
/**
/**
@ -153,6 +157,7 @@ function hook_islandora_edit_object_alter(&$object, &$rendered) {
* @see FedoraApiM::modifyObject()
* @see FedoraApiM::modifyObject()
*/
*/
function hook_islandora_object_alter(AbstractObject $object, array & $context) {
function hook_islandora_object_alter(AbstractObject $object, array & $context) {
}
}
/**
/**
@ -161,6 +166,7 @@ function hook_islandora_object_alter(AbstractObject $object, array &$context) {
* @see hook_islandora_object_alter()
* @see hook_islandora_object_alter()
*/
*/
function hook_cmodel_pid_islandora_object_alter(AbstractObject $object, array & $context) {
function hook_cmodel_pid_islandora_object_alter(AbstractObject $object, array & $context) {
}
}
/**
/**
@ -202,6 +208,7 @@ function hook_cmodel_pid_islandora_object_alter(AbstractObject $object, array &$
* @see FedoraApiM::modifyDatastream()
* @see FedoraApiM::modifyDatastream()
*/
*/
function hook_islandora_datastream_alter(AbstractObject $object, AbstractDatastream $datastream, array & $context) {
function hook_islandora_datastream_alter(AbstractObject $object, AbstractDatastream $datastream, array & $context) {
}
}
/**
/**
@ -210,6 +217,7 @@ function hook_islandora_datastream_alter(AbstractObject $object, AbstractDatastr
* @see hook_islandora_datastream_alter()
* @see hook_islandora_datastream_alter()
*/
*/
function hook_cmodel_pid_dsid_islandora_datastream_alter(AbstractObject $object, AbstractDatastream $datastream, array & $context) {
function hook_cmodel_pid_dsid_islandora_datastream_alter(AbstractObject $object, AbstractDatastream $datastream, array & $context) {
}
}
/**
/**
@ -226,6 +234,7 @@ function hook_cmodel_pid_dsid_islandora_datastream_alter(AbstractObject $object,
* The object that was ingested.
* The object that was ingested.
*/
*/
function hook_islandora_object_ingested(AbstractObject $object) {
function hook_islandora_object_ingested(AbstractObject $object) {
}
}
/**
/**
@ -234,6 +243,7 @@ function hook_islandora_object_ingested(AbstractObject $object) {
* @see hook_islandora_object_ingested()
* @see hook_islandora_object_ingested()
*/
*/
function hook_cmodel_pid_islandora_object_ingested(AbstractObject $object) {
function hook_cmodel_pid_islandora_object_ingested(AbstractObject $object) {
}
}
/**
/**
@ -251,6 +261,7 @@ function hook_cmodel_pid_islandora_object_ingested(AbstractObject $object) {
* parameter.
* parameter.
*/
*/
function hook_islandora_object_modified(AbstractObject $object) {
function hook_islandora_object_modified(AbstractObject $object) {
}
}
/**
/**
@ -259,6 +270,7 @@ function hook_islandora_object_modified(AbstractObject $object) {
* @see hook_islandora_object_modified()
* @see hook_islandora_object_modified()
*/
*/
function hook_cmodel_pid_islandora_object_modified(AbstractObject $object) {
function hook_cmodel_pid_islandora_object_modified(AbstractObject $object) {
}
}
/**
/**
@ -271,6 +283,7 @@ function hook_cmodel_pid_islandora_object_modified(AbstractObject $object) {
* The ID of the object that was purged/deleted.
* The ID of the object that was purged/deleted.
*/
*/
function hook_islandora_object_purged($pid) {
function hook_islandora_object_purged($pid) {
}
}
/**
/**
@ -279,6 +292,7 @@ function hook_islandora_object_purged($pid) {
* @see hook_islandora_object_purged()
* @see hook_islandora_object_purged()
*/
*/
function hook_cmodel_pid_islandora_object_purged($pid) {
function hook_cmodel_pid_islandora_object_purged($pid) {
}
}
/**
/**
@ -296,6 +310,7 @@ function hook_cmodel_pid_islandora_object_purged($pid) {
* The ingested datastream.
* The ingested datastream.
*/
*/
function hook_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) {
function hook_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) {
}
}
/**
/**
@ -304,6 +319,7 @@ function hook_islandora_datastream_ingested(AbstractObject $object, AbstractData
* @see hook_islandora_object_ingested()
* @see hook_islandora_object_ingested()
*/
*/
function hook_cmodel_pid_dsid_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) {
function hook_cmodel_pid_dsid_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) {
}
}
/**
/**
@ -323,6 +339,7 @@ function hook_cmodel_pid_dsid_islandora_datastream_ingested(AbstractObject $obje
* parameter.
* parameter.
*/
*/
function hook_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream) {
function hook_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream) {
}
}
/**
/**
@ -331,6 +348,7 @@ function hook_islandora_datastream_modified(AbstractObject $object, AbstractData
* @see hook_islandora_datastream_modified()
* @see hook_islandora_datastream_modified()
*/
*/
function hook_cmodel_pid_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream) {
function hook_cmodel_pid_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream) {
}
}
/**
/**
@ -345,6 +363,7 @@ function hook_cmodel_pid_islandora_datastream_modified(AbstractObject $object, A
* The ID of the datastream that was purged/deleted.
* The ID of the datastream that was purged/deleted.
*/
*/
function hook_islandora_datastream_purged(AbstractObject $object, $dsid) {
function hook_islandora_datastream_purged(AbstractObject $object, $dsid) {
}
}
/**
/**
@ -353,6 +372,7 @@ function hook_islandora_datastream_purged(AbstractObject $object, $dsid) {
* @see hook_islandora_datastream_purged()
* @see hook_islandora_datastream_purged()
*/
*/
function hook_cmodel_pid_islandora_datastream_purged(AbstractObject $object, $dsid) {
function hook_cmodel_pid_islandora_datastream_purged(AbstractObject $object, $dsid) {
}
}
/**
/**
@ -370,12 +390,10 @@ function hook_cmodel_pid_islandora_datastream_purged(AbstractObject $object, $ds
*/
*/
function hook_islandora_edit_datastream_registry($object, $dsid) {
function hook_islandora_edit_datastream_registry($object, $dsid) {
$routes = array();
$routes = array();
$routes[] = array(
$routes[] = array(
'name' => t('My Awesome Edit Route'),
'name' => t('My Awesome Edit Route'),
'url' => "go/edit/here/{$object->id}/{$dsid}",
'url' => "go/edit/here/{$object->id}/{$dsid}",
);
);
return $routes;
return $routes;
}
}
@ -391,6 +409,7 @@ function hook_islandora_edit_datastream_registry($object, $dsid) {
* @example islandora_islandora_required_objects()
* @example islandora_islandora_required_objects()
*/
*/
function hook_islandora_required_objects() {
function hook_islandora_required_objects() {
}
}
/**
/**
@ -403,6 +422,7 @@ function hook_islandora_required_objects() {
* @see islandora_get_viewer_callback()
* @see islandora_get_viewer_callback()
*/
*/
function hook_islandora_viewer_info() {
function hook_islandora_viewer_info() {
}
}
/**
/**
@ -490,6 +510,7 @@ function hook_islandora_ingest_steps(array $form_state) {
* An array containing the Drupal form_state.
* An array containing the Drupal form_state.
*/
*/
function hook_islandora_ingest_steps_alter(array & $steps, array & $form_state) {
function hook_islandora_ingest_steps_alter(array & $steps, array & $form_state) {
}
}
/**
/**
@ -503,6 +524,7 @@ function hook_islandora_ingest_steps_alter(array &$steps, array &$form_state) {
* @see hook_islandora_ingest_steps()
* @see hook_islandora_ingest_steps()
*/
*/
function hook_cmodel_pid_islandora_ingest_steps(array $form_state) {
function hook_cmodel_pid_islandora_ingest_steps(array $form_state) {
}
}
/**
/**
@ -515,6 +537,7 @@ function hook_cmodel_pid_islandora_ingest_steps(array $form_state) {
* An array containing the Drupal form_state.
* An array containing the Drupal form_state.
*/
*/
function hook_cmodel_pid_islandora_ingest_steps_alter(array & $steps, array & $form_state) {
function hook_cmodel_pid_islandora_ingest_steps_alter(array & $steps, array & $form_state) {
}
}
/**
/**
@ -538,13 +561,10 @@ function hook_islandora_object_access($op, $object, $user) {
switch ($op) {
switch ($op) {
case 'create stuff':
case 'create stuff':
return TRUE;
return TRUE;
case 'break stuff':
case 'break stuff':
return FALSE;
return FALSE;
case 'do a barrel roll!':
case 'do a barrel roll!':
return NULL;
return NULL;
}
}
}
}
@ -554,6 +574,7 @@ function hook_islandora_object_access($op, $object, $user) {
* @see hook_islandora_object_access()
* @see hook_islandora_object_access()
*/
*/
function hook_cmodel_pid_islandora_object_access($op, $object, $user) {
function hook_cmodel_pid_islandora_object_access($op, $object, $user) {
}
}
/**
/**
@ -577,13 +598,10 @@ function hook_islandora_datastream_access($op, $object, $user) {
switch ($op) {
switch ($op) {
case 'create stuff':
case 'create stuff':
return TRUE;
return TRUE;
case 'break stuff':
case 'break stuff':
return FALSE;
return FALSE;
case 'do a barrel roll!':
case 'do a barrel roll!':
return NULL;
return NULL;
}
}
}
}
@ -593,6 +611,7 @@ function hook_islandora_datastream_access($op, $object, $user) {
* @see hook_islandora_datastream_access()
* @see hook_islandora_datastream_access()
*/
*/
function hook_cmodel_pid_islandora_datastream_access($op, $object, $user) {
function hook_cmodel_pid_islandora_datastream_access($op, $object, $user) {
}
}
/**
/**
@ -610,6 +629,7 @@ function hook_islandora_overview_object(AbstractObject $object) {
function hook_cmodel_pid_islandora_overview_object(AbstractObject $object) {
function hook_cmodel_pid_islandora_overview_object(AbstractObject $object) {
return drupal_render(drupal_get_form('some_form', $object));
return drupal_render(drupal_get_form('some_form', $object));
}
}
/**
/**
* Lets one alter the overview tab in object management.
* Lets one alter the overview tab in object management.
*/
*/
@ -669,7 +689,6 @@ function hook_cmodel_pid_islandora_overview_object_alter(AbstractObject &$object
* is being called from.
* is being called from.
*/
*/
function hook_islandora_derivative(AbstractObject $object = NULL) {
function hook_islandora_derivative(AbstractObject $object = NULL) {
$derivatives[] = array(
$derivatives[] = array(
'source_dsid' => 'OBJ',
'source_dsid' => 'OBJ',
'destination_dsid' => 'DERIV',
'destination_dsid' => 'DERIV',
@ -689,7 +708,6 @@ function hook_islandora_derivative(AbstractObject $object = NULL) {
),
),
);
);
}
}
$derivatives[] = array(
$derivatives[] = array(
'source_dsid' => NULL,
'source_dsid' => NULL,
'destination_dsid' => 'NOSOURCE',
'destination_dsid' => 'NOSOURCE',
@ -698,7 +716,6 @@ function hook_islandora_derivative(AbstractObject $object = NULL) {
'islandora_derivatives_test_create_nosource_datastream',
'islandora_derivatives_test_create_nosource_datastream',
),
),
);
);
return $derivatives;
return $derivatives;
}
}
@ -725,6 +742,7 @@ function hook_islandora_update_related_objects_properties(AbstractObject $object
}
}
return $pids_to_return;
return $pids_to_return;
}
}
/**
/**
* Alters breadcrumbs used on Solr search results and within Islandora views.
* Alters breadcrumbs used on Solr search results and within Islandora views.
*
*