diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index ba2f30d9..b4f2eb2f 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -16,8 +16,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) {}