function user_menu
Search API
7.x user.module | user_menu() |
6.x user.module | user_menu() |
4.x user.module | user_menu() |
5.x user.module | user_menu() |
Implementation of hook_menu
File
- modules/
user/ user.module, line 6
Code
function user_menu() {
$items = array();
// This one will appear in our admin menu
$items ["admin/config/users"] = array(
"title" => "Users",
"description" => "Search and manage FlightPath users",
"page_callback" => "user_subtab_switchboard",
"access_arguments" => array("manage_users"),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
"weight" => 100,
);
// Subtab for which type of user we want to work on.
$items ["admin/users/faculty"] = array(
"title" => "Faculty / Staff Users",
"description" => "Search and manage faculty/staff users",
"page_callback" => "user_display_users",
"access_arguments" => array("manage_users"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Back to main menu",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_SUB_TAB,
"tab_family" => "users",
"tab_parent" => "admin-tools/admin",
"weight" => 100,
);
$items ["admin/users/students"] = array(
"title" => "Student Users",
"page_callback" => "user_display_student_users",
"access_arguments" => array("manage_users"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Back to main menu",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_SUB_TAB,
"tab_family" => "users",
"tab_parent" => "admin-tools/admin",
"weight" => 100,
);
$items ["admin/config/user-roles"] = array(
"title" => "User roles",
"description" => "Manage roles for users. Ex: advisors, viewers, etc.",
"page_callback" => "fp_render_form",
"page_arguments" => array("user_user_roles_form"),
"access_arguments" => array("can_edit_user_roles"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Back to main menu",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
"weight" => 110,
);
$items ["admin/users/edit-user"] = array(
"title" => "Edit Faculty/Staff User",
"page_callback" => "fp_render_form",
"page_arguments" => array("user_edit_user_form"),
"access_arguments" => array("manage_users"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Back to main menu",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Users list",
"path" => "admin/users/faculty",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
);
$items ["admin/users/edit-student-user"] = array(
"title" => "Edit User",
"page_callback" => "fp_render_form",
"page_arguments" => array("user_edit_student_user_form"),
"access_arguments" => array("manage_users"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Back to main menu",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Back to Users list",
"path" => "admin/users/students",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
);
$items ["admin/config/permissions"] = array(
"title" => "Permissions",
"description" => "Manage permissions for user roles in FlightPath",
"page_callback" => "fp_render_form",
"page_arguments" => array("user_permissions_form"),
"access_arguments" => array("can_edit_permissions"),
"page_settings" => array(
"page_has_search" => FALSE,
"page_banner_is_link" => TRUE,
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => "Back to main menu",
"path" => "admin-tools/admin",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_NORMAL_ITEM,
"tab_parent" => "admin-tools/admin",
"weight" => 120,
);
return $items;
}