From 6f4e2999a977309c1200dd61f709ca15940ac8b2 Mon Sep 17 00:00:00 2001 From: Mitchell MacKenzie Date: Fri, 18 May 2012 13:22:17 -0300 Subject: [PATCH] Merge ingest changes --- includes/ingest-menu.inc | 43 ++++++++++++++++++++++++++++++++++++++++ islandora.api.php | 10 +++++++++- islandora.module | 9 +++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 includes/ingest-menu.inc diff --git a/includes/ingest-menu.inc b/includes/ingest-menu.inc new file mode 100644 index 00000000..b2e795a2 --- /dev/null +++ b/includes/ingest-menu.inc @@ -0,0 +1,43 @@ + 'markup', + '#markup' => '', + ); + foreach ($ingest_registry AS $ingest_route) { + $output['#markup'] .= l($ingest_route['name'], $ingest_route['url']) . '
'; + } + return $output; +} \ No newline at end of file diff --git a/islandora.api.php b/islandora.api.php index da949ffa..96b283a3 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -17,4 +17,12 @@ function hook_islandora_preingest_alter(){} function hook_islandora_postingest($object){} -function hook_islandora_datastream_edit($object, $dsid){} \ No newline at end of file +function hook_islandora_datastream_edit($object, $dsid){} + +/** + * 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_pid) {} \ No newline at end of file diff --git a/islandora.module b/islandora.module index 3b8e5412..4f139e95 100644 --- a/islandora.module +++ b/islandora.module @@ -165,6 +165,15 @@ function islandora_menu() { 'access arguments' => array(FEDORA_PURGE), ); + $items['islandora/ingest/%'] = array( + 'title' => t('Ingest object'), + 'page callback' => 'islandora_ingest_callback', + 'page arguments' => array(2), + 'file' => 'includes/ingest-menu.inc', + 'type' => MENU_CALLBACK, + 'access arguments' => array(FEDORA_INGEST) + ); + return $items; }