From 0e24c7f4063e2966a8e874338d8287b4b0b7c583 Mon Sep 17 00:00:00 2001 From: Matthew Perry Date: Mon, 16 Nov 2015 12:20:09 -0400 Subject: [PATCH] Updating constant. --- includes/utilities.inc | 4 ++-- islandora.api.php | 7 +++---- islandora.module | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/includes/utilities.inc b/includes/utilities.inc index fa9b7594..7db58557 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -959,12 +959,12 @@ function islandora_deployed_on_windows() { * The built edit registry array. */ function islandora_build_datastream_edit_registry($object, $datastream) { - $edit_registry = module_invoke_all('islandora_edit_datastream_registry', $object, $datastream); + $edit_registry = module_invoke_all(ISLANDORA_EDIT_DATASTREAM_REGISTRY_HOOK, $object, $datastream); $context = array( 'object' => $object, 'datastream' => $datastream, 'original_edit_registry' => $edit_registry, ); - drupal_alter(ISLANDORA_EDIT_DATASTREAM_MODIFY_REGISTRY_HOOK, $edit_registry, $context); + drupal_alter(ISLANDORA_EDIT_DATASTREAM_REGISTRY_HOOK, $edit_registry, $context); return $edit_registry; } diff --git a/islandora.api.php b/islandora.api.php index 31f1c055..c88f0c20 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -857,12 +857,12 @@ function hook_islandora_get_breadcrumb_query_predicates() { * The array of registry paths. * @param array $context * An associative array containing: - * - datastream_parent: The datastream parent. + * - object: The object that owns the datastream being edited. * - datastream: The datastream being edited. * - original_edit_registry: The original edit_registry prior to any * modifications. */ -function hook_islandora_edit_datastream_modify_registry_alter(&$edit_registry, $context) { +function hook_islandora_edit_datastream_registry_alter(&$edit_registry, $context) { // Example: Remove xml form builder edit registry. if (isset($edit_registry['xml_form_builder_edit_form_registry'])) { unset($edit_registry['xml_form_builder_edit_form_registry']); @@ -870,7 +870,6 @@ function hook_islandora_edit_datastream_modify_registry_alter(&$edit_registry, $ // Add custom form to replace the removed form builder edit_form. $edit_registry['somemodule_custom_form'] = array( 'name' => t('Somemodule Custom Form'), - 'url' => "islandora/custom_form/{$context['object']->id}/{$context['datastream']->id}", - 'weight' => 1, + 'url' => "islandora/custom_form/{$context['object']->id}/{$context['datastream']->id}" ); } diff --git a/islandora.module b/islandora.module index e3eeada7..25f01cbe 100644 --- a/islandora.module +++ b/islandora.module @@ -52,7 +52,7 @@ define('ISLANDORA_UPDATE_RELATED_OBJECTS_PROPERTIES_HOOK', 'islandora_update_rel define('ISLANDORA_METADATA_OBJECT_ALTER', 'islandora_metadata_object'); define('ISLANDORA_METADATA_OBJECT_DESCRIPTION_ALTER', 'islandora_metadata_object_description'); define('ISLANDORA_BREADCRUMB_FILTER_PREDICATE_HOOK', 'islandora_get_breadcrumb_query_predicates'); -define('ISLANDORA_EDIT_DATASTREAM_MODIFY_REGISTRY_HOOK', 'islandora_edit_datastream_modify_registry'); +define('ISLANDORA_EDIT_DATASTREAM_REGISTRY_HOOK', 'islandora_edit_datastream_registry'); // @todo Add Documentation. define('ISLANDORA_OBJECT_INGESTED_HOOK', 'islandora_object_ingested');