Commit a004242d authored by Mark Jordan's avatar Mark Jordan
Browse files

Cleanup up some cruft; clarified function-level comments.

parent dbbf1356
......@@ -5,7 +5,7 @@
*/
function digitallibsfuca_custom_navigation_menu() {
$items = array();
// Menu item that appears on top-level collection object pages.
// Menu item that appears on collection object pages.
$items['collection/home/%digitallibsfuca_custom_navigation_get_pid_from_url'] = array(
'title' => 'Visit the collection home page',
'page callback' => 'digitallibsfuca_custom_navigation_get_collection_home_page_url',
......@@ -15,7 +15,7 @@ function digitallibsfuca_custom_navigation_menu() {
'type' => MENU_NORMAL_ITEM,
'menu_name' => 'sfu-custom-nav',
);
// Menu item that appears on islandora_collection node pages.
// Menu item that appears on nodes of type islandora_collection (aka the "collection homepages").
$items['collection/browse/%digitallibsfuca_custom_navigation_get_pid_from_node'] = array(
'title' => 'Browse the collection',
'page callback' => 'digitallibsfuca_custom_navigation_get_collection_browse_url',
......@@ -29,13 +29,14 @@ function digitallibsfuca_custom_navigation_menu() {
}
/**
* Menu item access callback for visibility of menu item to collection homepage.
* Menu item access callback.
*
*
* Makes the menu item show up only if the user is on a collection object page.
* Makes the menu item show up only if the user is on a collection object.
* Menu item contains link to collection homepage.
*/
function digitallibsfuca_custom_navigation_collection_home_link_visibility($pid) {
global $base_url;
$host = 'http://newspapers.lib.sfu.ca';
if ($object = islandora_object_load($pid)) {
$root_collection = variable_get('islandora_repository_pid', 'islandora:root');
$object_collections = $object->relationships->get(FEDORA_RELS_EXT_URI, 'isMemberOfCollection');
......@@ -53,7 +54,8 @@ function digitallibsfuca_custom_navigation_collection_home_link_visibility($pid)
/**
* Menu item access callback.
*
* Only makes the item show up if the user is on a collection home page.
* Makes the menu item show up only if the user is on a collection home page.
* Menu item contains link to collection object.
*/
function digitallibsfuca_custom_navigation_collection_browse_link_visibility($pid) {
if ($pid) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment