function admin_menu
Search API
7.x admin.module | admin_menu() |
6.x admin.module | admin_menu() |
4.x admin.module | admin_menu() |
5.x admin.module | admin_menu() |
Implementation of hook_menu
File
- modules/
admin/ admin.module, line 18 - The administrative configurations for FlightPath.
Code
function admin_menu() {
$items = array();
$items ["admin-tools/admin"] = array(
"title" => "FlightPath Admin Console",
"page_callback" => "admin_display_main",
"access_arguments" => array("can_access_admin"),
"tab_family" => "admin",
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"target" => "_blank",
),
"type" => MENU_TYPE_TAB,
);
$items ["admin/config/urgent-message"] = array(
"title" => "Edit urgent message",
"description" => "Set a message which will be displayed to all users on every page",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_urgent_message_form", "system_settings"),
"access_arguments" => array("can_edit_urgent_message"),
"page_settings" => array(
"page_has_search" => FALSE,
"menu_icon" => fp_get_module_path('admin') . "/icons/error.png",
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
);
$items ["admin/config/watchdog"] = array(
"title" => "Watchdog (logs)",
"description" => "View log messages from throughout the system",
"page_callback" => "admin_display_watchdog",
"access_arguments" => array("display_watchdog"),
"page_settings" => array(
"page_has_search" => FALSE,
"menu_icon" => fp_get_module_path('system') . "/icons/application_view_list.png",
"page_show_title" => TRUE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
);
$items ["admin/config/watchdog/%"] = array(
"title" => "View Watchdog Entry",
"page_callback" => "admin_display_watchdog_entry",
"page_arguments" => array(3),
"access_arguments" => array("display_watchdog"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_show_title" => TRUE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to watchdog",
"path" => "admin/config/watchdog",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%&sev_filter=%SEV_FILTER%&page=%PAGE%&type_filter=%TYPE_FILTER%",
),
),
),
"type" => MENU_TYPE_CALLBACK,
"tab_parent" => "admin-tools/admin",
);
$items ["admin/duplicate-year"] = array(
"title" => "Duplicate entire catalog year",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_duplicate_year_form"),
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
);
$items ["admin/edit-advising-settings"] = array(
"title" => "Edit advising settings",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_advising_settings_form", "system_settings"),
"access_arguments" => array("can_edit_advising_settings"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
);
$items ["admin/apply-draft-changes"] = array(
"title" => "Apply draft changes",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_apply_draft_changes_form"),
"access_arguments" => array("can_apply_draft_changes"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
);
///////////////////////////////////////////////////////
////////////////////// Degree Editing ///////////////////
$items ["admin/degrees"] = array(
"title" => "Degrees",
"page_callback" => "admin_display_degrees",
"access_arguments" => array("can_access_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_TAB,
"tab_family" => "admin_degrees",
);
/* OLD - marked for deletion
$items["admin/degrees/edit-degree"] = array(
"title" => "Edit Degree",
"page_callback" => "admin_display_edit_degree",
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Degrees list",
"path" => "admin/degrees",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin/degrees",
);
*/
$items ["admin/degrees/edit-degree/%/%"] = array(
"title" => "Edit Degree",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_edit_degree_form", "normal", 3, 4),
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Degrees list",
"path" => "admin/degrees",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin/degrees",
);
/* OLD - marked for deletion
$items["admin/degrees/handle-edit-degree-submit"] = array(
"page_callback" => "admin_handle_edit_degree_submit",
"access_arguments" => array("can_edit_data_entry"),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_CALLBACK,
);
*/
$items ["admin/degrees/popup-add-group"] = array(
"title" => "Add Group",
"page_callback" => "admin_display_degrees_popup_add_group",
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_is_popup" => TRUE,
"page_hide_report_error" => TRUE,
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_CALLBACK,
);
$items ["admin/degrees/popup-add-group2"] = array(
"title" => "Add Group",
"page_callback" => "admin_display_degrees_popup_add_group2",
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_is_popup" => TRUE,
"page_hide_report_error" => TRUE,
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_CALLBACK,
);
$items ["admin/degrees/add-degree"] = array(
"title" => "Add Degree",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_add_degree_form"),
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Degrees list",
"path" => "admin/degrees",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin/degrees",
);
$items ["admin/degrees/copy-degree"] = array(
"title" => "Copy Degree",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_copy_degree_form"),
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Degrees list",
"path" => "admin/degrees",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_CALLBACK,
"tab_parent" => "admin/degrees",
);
///////////////////////////////////////////////////////
////////////////////// Group Editing ///////////////////
$items ["admin/groups"] = array(
"title" => "Groups",
"page_callback" => "admin_display_groups",
"access_arguments" => array("can_access_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_TAB,
"tab_family" => "admin_groups",
);
$items ["admin/groups/edit-group"] = array(
"title" => "Edit Group",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_edit_group_form"),
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Groups list",
"path" => "admin/groups",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin/groups",
);
$items ["admin/groups/popup-select-icon"] = array(
"title" => "Select Icon",
"page_callback" => "admin_display_groups_popup_select_icon",
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_is_popup" => TRUE,
"page_hide_report_error" => TRUE,
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_CALLBACK,
);
$items ["admin/groups/popup-edit-definition"] = array(
"title" => "Edit Definition",
"page_callback" => "admin_display_groups_popup_edit_definition",
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_is_popup" => TRUE,
"page_hide_report_error" => TRUE,
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_CALLBACK,
);
$items ["admin/groups/popup-show-group-use"] = array(
"title" => "Group Use",
"page_callback" => "admin_display_groups_popup_show_group_use",
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_is_popup" => TRUE,
"page_hide_report_error" => TRUE,
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_CALLBACK,
);
$items ["admin/groups/process-all-definitions"] = array(
"title" => "Process all Definitions",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_process_all_definitions_form"),
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Groups list",
"path" => "admin/groups",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin/groups",
);
/////////////////////////////////////////////////
/////////////////// Courses editing ////////////////
$items ["admin/courses"] = array(
"title" => "Courses",
"page_callback" => "admin_display_courses",
"access_arguments" => array("can_access_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.courses.inc",
"type" => MENU_TYPE_TAB,
"tab_family" => "admin_courses",
);
$items ["admin/courses/edit-course"] = array(
"title" => "Edit Course",
"page_callback" => "fp_render_form",
"page_arguments" => array("admin_edit_course_form"),
"access_arguments" => array("can_edit_data_entry"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Admin Console",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Courses list",
"path" => "admin/courses",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.courses.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin/courses",
);
return $items;
}