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"] = array(
"title" => "Admin Tools",
"page_callback" => "admin_display_tools_screen",
"access_arguments" => array("can_access_admin_tools"),
"tab_family" => "admin",
"page_settings" => array(
"page_hide_report_error" => TRUE,
),
"type" => MENU_TYPE_NORMAL_ITEM,
);
$items ["admin-tools/admin"] = array(
"title" => t("FlightPath Admin Console"),
"description" => t("This area contains the bulk of settings, degree entry, and other configurations for FlightPath."),
"page_callback" => "admin_display_main",
"access_arguments" => array("can_access_admin"),
"page_settings" => array(
"menu_links" => array(
0 => array(
"text" => "Admin Tools",
"path" => "admin-tools",
),
),
"menu_icon" => fp_get_module_path('system') . "/icons/FlightPath_Academics_plane_only.png",
),
'weight' => 999,
"type" => MENU_TYPE_NORMAL_ITEM,
);
$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(
"menu_icon" => fp_get_module_path('admin') . "/icons/error.png",
"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,
);
$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(
"menu_icon" => fp_get_module_path('system') . "/icons/application_view_list.png",
"page_show_title" => 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,
);
$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_show_title" => 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" => "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,
);
$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_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_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_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_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_NORMAL_ITEM,
);
$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_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" => "Degrees",
"path" => "admin/degrees",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
);
$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_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_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_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" => "Degrees",
"path" => "admin/degrees",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
);
$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_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" => "Degrees",
"path" => "admin/degrees",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.degrees.inc",
"type" => MENU_TYPE_CALLBACK,
);
///////////////////////////////////////////////////////
////////////////////// Group Editing ///////////////////
$items ["admin/groups"] = array(
"title" => "Groups",
"page_callback" => "admin_display_groups",
"access_arguments" => array("can_access_data_entry"),
"page_settings" => array(
"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_NORMAL_ITEM
);
$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_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" => "Groups",
"path" => "admin/groups",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
);
$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_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_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_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_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" => "Groups",
"path" => "admin/groups",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.groups.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
);
/////////////////////////////////////////////////
/////////////////// Courses editing ////////////////
$items ["admin/courses"] = array(
"title" => "Courses",
"page_callback" => "admin_display_courses",
"access_arguments" => array("can_access_data_entry"),
"page_settings" => array(
"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_NORMAL_ITEM,
);
$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_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" => "Courses",
"path" => "admin/courses",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"file" => menu_get_module_path("admin") . "/admin.courses.inc",
"type" => MENU_TYPE_NORMAL_ITEM,
);
return $items;
}