diff --git a/includes/globals.inc b/includes/globals.inc index e85a71bc..3cece340 100644 --- a/includes/globals.inc +++ b/includes/globals.inc @@ -321,8 +321,23 @@ function islandora_get_missing_datastreams_requirements(FedoraObject $object) { * object. */ function islandora_get_datastreams_requirements(FedoraObject $object) { + return islandora_get_datastreams_requirements_from_models($object->models); +} + +/** + * Get the list of which datastreams are valid in the given set of models. + * + * @param array $models + * An array of content models PIDs from which to parse the DS-COMPOSITE-MODEL + * stream. + * + * @return array + * An associative array of associative arrays, merged from calls to + * islandora_get_datastreams_requirements_from_content_model(). + */ +function islandora_get_datastreams_requirements_from_models(array $models) { $dsids = array(); - foreach ($object->models as $model) { + foreach ($models as $model) { $model = islandora_get_object_by_id($model); $dsids += islandora_get_datastreams_requirements_from_content_model($model); } diff --git a/islandora.api.php b/islandora.api.php index 9f1e1e5c..337814fa 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -235,6 +235,10 @@ function hook_islandora_undeletable_datastreams(array $models) {} * - 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. + * And may optionally include both: + * - module: A module from which we want to load an include. + * - file: A file to include (relative to the module's path, including the + * file's extension). */ function hook_islandora_ingest_steps(array $configuration) { return array(