{"action":"created","comment":{"url":"https://api.github.com/repos/Islandora/islandora/pulls/comments/77063160","id":77063160,"diff_hunk":"@@ -886,3 +886,45 @@ function hook_islandora_edit_datastream_registry_alter(&$edit_registry, $context\n function hook_islandora_repository_connection_construction_alter(RepositoryConnection $instance) {\n   $instance->userAgent = \"Tuque/cURL\";\n }\n+\n+/**\n+ * Allow a overridable backend for generating breadcrumbs.\n+ *\n+ * Stolen shamelessly from @adam-vessey\n+ *\n+ * @return array\n+ *   Should return an associative array mapping unique (module-prefixed,\n+ *   preferably) keys to associative arrays containing:\n+ *   - title: A human-readable title for the backend.\n+ *   - callable: A PHP callable to call for this backend, implementing\n+ *     callback_islandora_basic_collection_query_backends().\n+ *   - file: An optional file to load before attempting to call the callable.\n+ */\n+function hook_islandora_breadcrumbs_backends() {\n+  $a_callable = function ($object) {\n+    // Do something to get an array of breadcrumb links for $object, root first.\n+    return array($root_link, $collection_link, $object_link);","path":"islandora.api.php","position":21,"original_position":21,"commit_id":"0194344ce1f78aa2f01cc8ef20d7cb73bb16a469","original_commit_id":"0194344ce1f78aa2f01cc8ef20d7cb73bb16a469","user":{"login":"rosiel","id":1943338,"avatar_url":"https://avatars.githubusercontent.com/u/1943338?v=3","gravatar_id":"","url":"https://api.github.com/users/rosiel","html_url":"https://github.com/rosiel","followers_url":"https://api.github.com/users/rosiel/followers","following_url":"https://api.github.com/users/rosiel/following{/other_user}","gists_url":"https://api.github.com/users/rosiel/gists{/gist_id}","starred_url":"https://api.github.com/users/rosiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosiel/subscriptions","organizations_url":"https://api.github.com/users/rosiel/orgs","repos_url":"https://api.github.com/users/rosiel/repos","events_url":"https://api.github.com/users/rosiel/events{/privacy}","received_events_url":"https://api.github.com/users/rosiel/received_events","type":"User","site_admin":false},"body":"should this demonstrate how to use the function below? e.g.\r\n`return callback_islandora_breadcrumbs_backends($object);` ? \r\n","created_at":"2016-08-31T20:08:23Z","updated_at":"2016-08-31T20:08:23Z","html_url":"https://github.com/Islandora/islandora/pull/651#discussion_r77063160","pull_request_url":"https://api.github.com/repos/Islandora/islandora/pulls/651","_links":{"self":{"href":"https://api.github.com/repos/Islandora/islandora/pulls/comments/77063160"},"html":{"href":"https://github.com/Islandora/islandora/pull/651#discussion_r77063160"},"pull_request":{"href":"https://api.github.com/repos/Islandora/islandora/pulls/651"}}},"pull_request":{"url":"https://api.github.com/repos/Islandora/islandora/pulls/651","id":72593383,"html_url":"https://github.com/Islandora/islandora/pull/651","diff_url":"https://github.com/Islandora/islandora/pull/651.diff","patch_url":"https://github.com/Islandora/islandora/pull/651.patch","issue_url":"https://api.github.com/repos/Islandora/islandora/issues/651","number":651,"state":"open","locked":false,"title":"7.x islandora 1724","user":{"login":"whikloj","id":2857697,"avatar_url":"https://avatars.githubusercontent.com/u/2857697?v=3","gravatar_id":"","url":"https://api.github.com/users/whikloj","html_url":"https://github.com/whikloj","followers_url":"https://api.github.com/users/whikloj/followers","following_url":"https://api.github.com/users/whikloj/following{/other_user}","gists_url":"https://api.github.com/users/whikloj/gists{/gist_id}","starred_url":"https://api.github.com/users/whikloj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whikloj/subscriptions","organizations_url":"https://api.github.com/users/whikloj/orgs","repos_url":"https://api.github.com/users/whikloj/repos","events_url":"https://api.github.com/users/whikloj/events{/privacy}","received_events_url":"https://api.github.com/users/whikloj/received_events","type":"User","site_admin":false},"body":"**JIRA Ticket**: https://jira.duraspace.org/browse/ISLANDORA-1724\r\n\r\n# What does this Pull Request do?\r\n\r\nThis PR allows other modules to implement a hook to replace the default generation of breadcrumbs with whatever method they wish. It adds an admin form space to choose which implementation to use.\r\n\r\n# What's new?\r\n\r\n* Adds a new hook `hook_islandora_breadcrumbs_backends` to add a custom breadcrumb method.\r\n* Adds a new section to the Islandora admin form to choose which breadcrumb method to use.\r\n* Makes the current method of `islandora_get_breadcrumbs()` invoke the above hook and based on the above Admin form selection invoke that callback function.\r\n* The existing `islandora_get_breadcrumbs_recursive()` Sparql function remains and is the default method.\r\n\r\n# How should this be tested?\r\n\r\nIf everything works as expected this PR should have no effect, unless you create a module that implements the hook.\r\n\r\nBreadcrumbs should still render properly, but you will see the new section on the admin form.\r\n\r\nIf you do implement a module with the hook, you should see it appears as an option on the admin form.\r\n\r\nChoosing the new implementation should change generation over.\r\n\r\nFor my testing example hook see:\r\nhttps://github.com/uml-digitalinitiatives/islandora_custom_solr/blob/7.x-hookable-breadcrumbs/islandora_custom_solr.module#L170-L179\r\n\r\n\r\n# Additional Notes:\r\n\r\nExample:\r\n* Does this change require documentation to be updated? \r\n\r\n     Yes - It adds a new option to the admin form which should be documented.\r\n* Does this change add any new dependencies? \r\n\r\n     No\r\n* Does this change require any other modifications to be made to the repository (ie. Regeneration activity, etc.)? \r\n\r\n    No\r\n* Could this change impact execution of existing code?\r\n\r\n    No\r\n\r\n# Interested parties\r\n@DiegoPino (because you suggested this method)\r\n@adam-vessey (because I copied your implementation in basic collection to do this) \r\n","created_at":"2016-06-04T05:09:36Z","updated_at":"2016-08-31T20:08:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"477e0c40e63597907365a40cf243e9d2596a65dc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Islandora/islandora/pulls/651/commits","review_comments_url":"https://api.github.com/repos/Islandora/islandora/pulls/651/comments","review_comment_url":"https://api.github.com/repos/Islandora/islandora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Islandora/islandora/issues/651/comments","statuses_url":"https://api.github.com/repos/Islandora/islandora/statuses/0194344ce1f78aa2f01cc8ef20d7cb73bb16a469","head":{"label":"whikloj:7.x-ISLANDORA-1724","ref":"7.x-ISLANDORA-1724","sha":"0194344ce1f78aa2f01cc8ef20d7cb73bb16a469","user":{"login":"whikloj","id":2857697,"avatar_url":"https://avatars.githubusercontent.com/u/2857697?v=3","gravatar_id":"","url":"https://api.github.com/users/whikloj","html_url":"https://github.com/whikloj","followers_url":"https://api.github.com/users/whikloj/followers","following_url":"https://api.github.com/users/whikloj/following{/other_user}","gists_url":"https://api.github.com/users/whikloj/gists{/gist_id}","starred_url":"https://api.github.com/users/whikloj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whikloj/subscriptions","organizations_url":"https://api.github.com/users/whikloj/orgs","repos_url":"https://api.github.com/users/whikloj/repos","events_url":"https://api.github.com/users/whikloj/events{/privacy}","received_events_url":"https://api.github.com/users/whikloj/received_events","type":"User","site_admin":false},"repo":{"id":32536645,"name":"islandora","full_name":"whikloj/islandora","owner":{"login":"whikloj","id":2857697,"avatar_url":"https://avatars.githubusercontent.com/u/2857697?v=3","gravatar_id":"","url":"https://api.github.com/users/whikloj","html_url":"https://github.com/whikloj","followers_url":"https://api.github.com/users/whikloj/followers","following_url":"https://api.github.com/users/whikloj/following{/other_user}","gists_url":"https://api.github.com/users/whikloj/gists{/gist_id}","starred_url":"https://api.github.com/users/whikloj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whikloj/subscriptions","organizations_url":"https://api.github.com/users/whikloj/orgs","repos_url":"https://api.github.com/users/whikloj/repos","events_url":"https://api.github.com/users/whikloj/events{/privacy}","received_events_url":"https://api.github.com/users/whikloj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whikloj/islandora","description":"A Drupal module for browsing and managing Fedora-based digital repositories","fork":true,"url":"https://api.github.com/repos/whikloj/islandora","forks_url":"https://api.github.com/repos/whikloj/islandora/forks","keys_url":"https://api.github.com/repos/whikloj/islandora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whikloj/islandora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whikloj/islandora/teams","hooks_url":"https://api.github.com/repos/whikloj/islandora/hooks","issue_events_url":"https://api.github.com/repos/whikloj/islandora/issues/events{/number}","events_url":"https://api.github.com/repos/whikloj/islandora/events","assignees_url":"https://api.github.com/repos/whikloj/islandora/assignees{/user}","branches_url":"https://api.github.com/repos/whikloj/islandora/branches{/branch}","tags_url":"https://api.github.com/repos/whikloj/islandora/tags","blobs_url":"https://api.github.com/repos/whikloj/islandora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whikloj/islandora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whikloj/islandora/git/refs{/sha}","trees_url":"https://api.github.com/repos/whikloj/islandora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whikloj/islandora/statuses/{sha}","languages_url":"https://api.github.com/repos/whikloj/islandora/languages","stargazers_url":"https://api.github.com/repos/whikloj/islandora/stargazers","contributors_url":"https://api.github.com/repos/whikloj/islandora/contributors","subscribers_url":"https://api.github.com/repos/whikloj/islandora/subscribers","subscription_url":"https://api.github.com/repos/whikloj/islandora/subscription","commits_url":"https://api.github.com/repos/whikloj/islandora/commits{/sha}","git_commits_url":"https://api.github.com/repos/whikloj/islandora/git/commits{/sha}","comments_url":"https://api.github.com/repos/whikloj/islandora/comments{/number}","issue_comment_url":"https://api.github.com/repos/whikloj/islandora/issues/comments{/number}","contents_url":"https://api.github.com/repos/whikloj/islandora/contents/{+path}","compare_url":"https://api.github.com/repos/whikloj/islandora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whikloj/islandora/merges","archive_url":"https://api.github.com/repos/whikloj/islandora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whikloj/islandora/downloads","issues_url":"https://api.github.com/repos/whikloj/islandora/issues{/number}","pulls_url":"https://api.github.com/repos/whikloj/islandora/pulls{/number}","milestones_url":"https://api.github.com/repos/whikloj/islandora/milestones{/number}","notifications_url":"https://api.github.com/repos/whikloj/islandora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whikloj/islandora/labels{/name}","releases_url":"https://api.github.com/repos/whikloj/islandora/releases{/id}","deployments_url":"https://api.github.com/repos/whikloj/islandora/deployments","created_at":"2015-03-19T17:34:24Z","updated_at":"2016-04-01T12:13:28Z","pushed_at":"2016-08-16T14:43:08Z","git_url":"git://github.com/whikloj/islandora.git","ssh_url":"git@github.com:whikloj/islandora.git","clone_url":"https://github.com/whikloj/islandora.git","svn_url":"https://github.com/whikloj/islandora","homepage":"http://islandora.ca/","size":20581,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"7.x-2.x"}},"base":{"label":"Islandora:7.x","ref":"7.x","sha":"ab520433c72365b69cfd1804a749e64d27adc853","user":{"login":"Islandora","id":494054,"avatar_url":"https://avatars.githubusercontent.com/u/494054?v=3","gravatar_id":"","url":"https://api.github.com/users/Islandora","html_url":"https://github.com/Islandora","followers_url":"https://api.github.com/users/Islandora/followers","following_url":"https://api.github.com/users/Islandora/following{/other_user}","gists_url":"https://api.github.com/users/Islandora/gists{/gist_id}","starred_url":"https://api.github.com/users/Islandora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Islandora/subscriptions","organizations_url":"https://api.github.com/users/Islandora/orgs","repos_url":"https://api.github.com/users/Islandora/repos","events_url":"https://api.github.com/users/Islandora/events{/privacy}","received_events_url":"https://api.github.com/users/Islandora/received_events","type":"Organization","site_admin":false},"repo":{"id":1107291,"name":"islandora","full_name":"Islandora/islandora","owner":{"login":"Islandora","id":494054,"avatar_url":"https://avatars.githubusercontent.com/u/494054?v=3","gravatar_id":"","url":"https://api.github.com/users/Islandora","html_url":"https://github.com/Islandora","followers_url":"https://api.github.com/users/Islandora/followers","following_url":"https://api.github.com/users/Islandora/following{/other_user}","gists_url":"https://api.github.com/users/Islandora/gists{/gist_id}","starred_url":"https://api.github.com/users/Islandora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Islandora/subscriptions","organizations_url":"https://api.github.com/users/Islandora/orgs","repos_url":"https://api.github.com/users/Islandora/repos","events_url":"https://api.github.com/users/Islandora/events{/privacy}","received_events_url":"https://api.github.com/users/Islandora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Islandora/islandora","description":"A Drupal module for browsing and managing Fedora-based digital repositories","fork":true,"url":"https://api.github.com/repos/Islandora/islandora","forks_url":"https://api.github.com/repos/Islandora/islandora/forks","keys_url":"https://api.github.com/repos/Islandora/islandora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Islandora/islandora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Islandora/islandora/teams","hooks_url":"https://api.github.com/repos/Islandora/islandora/hooks","issue_events_url":"https://api.github.com/repos/Islandora/islandora/issues/events{/number}","events_url":"https://api.github.com/repos/Islandora/islandora/events","assignees_url":"https://api.github.com/repos/Islandora/islandora/assignees{/user}","branches_url":"https://api.github.com/repos/Islandora/islandora/branches{/branch}","tags_url":"https://api.github.com/repos/Islandora/islandora/tags","blobs_url":"https://api.github.com/repos/Islandora/islandora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Islandora/islandora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Islandora/islandora/git/refs{/sha}","trees_url":"https://api.github.com/repos/Islandora/islandora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Islandora/islandora/statuses/{sha}","languages_url":"https://api.github.com/repos/Islandora/islandora/languages","stargazers_url":"https://api.github.com/repos/Islandora/islandora/stargazers","contributors_url":"https://api.github.com/repos/Islandora/islandora/contributors","subscribers_url":"https://api.github.com/repos/Islandora/islandora/subscribers","subscription_url":"https://api.github.com/repos/Islandora/islandora/subscription","commits_url":"https://api.github.com/repos/Islandora/islandora/commits{/sha}","git_commits_url":"https://api.github.com/repos/Islandora/islandora/git/commits{/sha}","comments_url":"https://api.github.com/repos/Islandora/islandora/comments{/number}","issue_comment_url":"https://api.github.com/repos/Islandora/islandora/issues/comments{/number}","contents_url":"https://api.github.com/repos/Islandora/islandora/contents/{+path}","compare_url":"https://api.github.com/repos/Islandora/islandora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Islandora/islandora/merges","archive_url":"https://api.github.com/repos/Islandora/islandora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Islandora/islandora/downloads","issues_url":"https://api.github.com/repos/Islandora/islandora/issues{/number}","pulls_url":"https://api.github.com/repos/Islandora/islandora/pulls{/number}","milestones_url":"https://api.github.com/repos/Islandora/islandora/milestones{/number}","notifications_url":"https://api.github.com/repos/Islandora/islandora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Islandora/islandora/labels{/name}","releases_url":"https://api.github.com/repos/Islandora/islandora/releases{/id}","deployments_url":"https://api.github.com/repos/Islandora/islandora/deployments","created_at":"2010-11-23T21:56:01Z","updated_at":"2016-07-29T14:37:25Z","pushed_at":"2016-07-30T16:10:24Z","git_url":"git://github.com/Islandora/islandora.git","ssh_url":"git@github.com:Islandora/islandora.git","clone_url":"https://github.com/Islandora/islandora.git","svn_url":"https://github.com/Islandora/islandora","homepage":"http://islandora.ca/","size":18110,"stargazers_count":84,"watchers_count":84,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":3,"forks":72,"open_issues":3,"watchers":84,"default_branch":"7.x"}},"_links":{"self":{"href":"https://api.github.com/repos/Islandora/islandora/pulls/651"},"html":{"href":"https://github.com/Islandora/islandora/pull/651"},"issue":{"href":"https://api.github.com/repos/Islandora/islandora/issues/651"},"comments":{"href":"https://api.github.com/repos/Islandora/islandora/issues/651/comments"},"review_comments":{"href":"https://api.github.com/repos/Islandora/islandora/pulls/651/comments"},"review_comment":{"href":"https://api.github.com/repos/Islandora/islandora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Islandora/islandora/pulls/651/commits"},"statuses":{"href":"https://api.github.com/repos/Islandora/islandora/statuses/0194344ce1f78aa2f01cc8ef20d7cb73bb16a469"}}}}
{"actor":{"display_login":"rosiel"}}