From dd700b16c8682a612003a6fb698d3842d8cb8078 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Mon, 26 Nov 2012 18:35:41 -0400 Subject: [PATCH] Build out documentation. --- includes/ingest.form.inc | 11 ++++++++++- islandora.api.php | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index 77717257..f00af036 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -15,7 +15,16 @@ * @param array $form_state * The drupal form state. * @param array $configuration - * A list of key value pairs that are used to build the list of steps to be executed. + * An associative array of configuration values that are used to build the + * list of steps to be executed, including: + * - id: The PID with which the object should be created. + * - namespace: The PID namespace in which the object should be created. + * (id is used first, if it is given). + * - label: The initial label for the object. Defaults to "New Object". + * - collections: An array of collection PIDs, to which the new object should + * be related. + * - models: An array of content model PIDs, to which the new object should + * subscribe * * @return array * The form definition of the current step. diff --git a/islandora.api.php b/islandora.api.php index 7c4cc121..9f1e1e5c 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -222,3 +222,33 @@ function hook_islandora_viewer_info() {} * Returns a list of datastreams that are determined to be undeletable. */ function hook_islandora_undeletable_datastreams(array $models) {} + +/** + * Define steps used in the islandora_ingest_form() ingest process. + * + * @return array + * An array of associative arrays which define each step in the ingest + * process. Steps are defined by by a number of properties (keys) including: + * - type: The type of step. Currently, only "form" is implemented. + * - weight: The "weight" of this step--heavier(/"larger") values sink to the + * end of the process while smaller(/"lighter") values are executed first. + * - form_id: The form building function to call to get the form structure + * for this step. + * - args: An array of arguments to pass to the form building function. + */ +function hook_islandora_ingest_steps(array $configuration) { + return array( + array( + 'type' => 'form', + 'weight' => 1, + 'form_id' => 'my_cool_form', + 'args' => array('arg_one', 'numero deux'), + ), + ); +} +/** + * Content model specific version of hook_islandora_ingest_steps(). + * + * @see hook_islandora_ingest_steps() + */ +function hook_CMODEL_PID_islandora_ingest_steps(array $configuration) {}