From 12b4c4e610fd294258c5c023d0b7e4d6764bad6a Mon Sep 17 00:00:00 2001 From: Kylea Jackson Date: Mon, 23 Mar 2015 13:53:57 -0300 Subject: [PATCH 1/3] Adding view to overview tab --- islandora.api.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/islandora.api.php b/islandora.api.php index dad43838..625dd7c5 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -601,7 +601,7 @@ function hook_cmodel_pid_islandora_overview_object(AbstractObject $object) { * Lets one alter the overview tab in object management. */ function hook_islandora_overview_object_alter(AbstractObject &$object, &$output) { - $output = $output . drupal_render(drupal_get_form('some_form', $object)); + $output = $output . drupal_render(drupal_get_form('some_form', $object))); } /** @@ -610,7 +610,12 @@ function hook_islandora_overview_object_alter(AbstractObject &$object, &$output) * Content model specific. */ function hook_cmodel_pid_islandora_overview_object_alter(AbstractObject &$object, &$output) { - $output = $output . drupal_render(drupal_get_form('some_form', $object)); + $view = views_embed_view('usage_collection'); + $form['islandora_manage_overview_object'] = array( + '#type' => 'item', + '#markup' => $view, + ); + $output = $output . $form . drupal_render(drupal_get_form('some_form', $object))); } /** From d63acbd7fb26c2bf1988534908883d08b4e7379f Mon Sep 17 00:00:00 2001 From: Kylea Jackson Date: Mon, 23 Mar 2015 14:10:32 -0300 Subject: [PATCH 2/3] had to include this in commit, same as 7.x --- tests/includes/utilities.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/includes/utilities.inc b/tests/includes/utilities.inc index 4eef5255..eefae4cc 100644 --- a/tests/includes/utilities.inc +++ b/tests/includes/utilities.inc @@ -315,7 +315,7 @@ class IslandoraTestUtilities extends IslandoraTestUtilityClass { * * @return bool * TRUE if all objects were removed, or FALSE if any of them still remained - * after removal. + * after removal. */ public function deleteUserCreatedObjects($username) { if ($username === $this->configuration['admin_user']) { From 58c6174d284bc726a5e87c327f1ae5dd8bda9bda Mon Sep 17 00:00:00 2001 From: Kylea Jackson Date: Mon, 23 Mar 2015 15:12:15 -0300 Subject: [PATCH 3/3] Cleaned up syntax --- islandora.api.php | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/islandora.api.php b/islandora.api.php index 742c77fd..95e08f1d 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -245,7 +245,7 @@ function hook_cmodel_pid_islandora_object_ingested(AbstractObject $object) { * modifications, where as manipulating an object's datstreams are not. * * @param AbstractObject $object - * The object that was modified. + * The object that was ingested. * * @todo We should also include what changes were made in a additional * parameter. @@ -254,7 +254,7 @@ function hook_islandora_object_modified(AbstractObject $object) { } /** - * Notify modules that the given object was modified. + * Notify modules that the given object was ingested. * * @see hook_islandora_object_modified() */ @@ -361,22 +361,9 @@ function hook_cmodel_pid_islandora_datastream_purged(AbstractObject $object, $ds * @param AbstractObject $object * The object to check. * @param string $dsid - * A string indicating the datastream for which to get the registry. - * - * @return array - * An array of associative arrays, each mapping: - * - name: A string containg a human-readable name for the entry. - * - url: A string containing the URL to which to the user will be routed. + * todo */ function hook_islandora_edit_datastream_registry($object, $dsid) { - $routes = array(); - - $routes[] = array( - 'name' => t('My Awesome Edit Route'), - 'url' => "go/edit/here/{$object->id}/{$dsid}", - ); - - return $routes; } /** @@ -614,7 +601,7 @@ function hook_cmodel_pid_islandora_overview_object(AbstractObject $object) { * Lets one alter the overview tab in object management. */ function hook_islandora_overview_object_alter(AbstractObject &$object, &$output) { - $output = $output . drupal_render(drupal_get_form('some_form', $object))); + $output = $output . drupal_render(drupal_get_form('some_form', $object)); } /** @@ -628,7 +615,7 @@ function hook_cmodel_pid_islandora_overview_object_alter(AbstractObject &$object '#type' => 'item', '#markup' => $view, ); - $output = $output . $form . drupal_render(drupal_get_form('some_form', $object))); + $output = $output . $form . drupal_render(drupal_get_form('some_form', $object)); } /**