function content_menu
Search API
7.x content.module | content_menu() |
6.x content.module | content_menu() |
4.x content.module | content_menu() |
5.x content.module | content_menu() |
File
- modules/
content/ content.module, line 13
Code
function content_menu() {
$items = array();
$items ["admin-tools/content"] = array(
"title" => "Content",
"description" => "Manage content in " . variable_get("system_name", "FlightPath") . ". Ex: Announcements.",
"page_callback" => "content_display_content_admin_list",
"access_arguments" => array("admin_content"),
"page_settings" => array(
"menu_icon" => fp_get_module_path('content') . "/icons/application_edit.png",
"page_show_title" => TRUE,
"menu_links" => array(
0 => array(
"text" => t("Admin Tools"),
"path" => "admin-tools",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
'type' => MENU_TYPE_DEFAULT_TAB,
'tab_family' => 'content_man_tabs',
"weight" => 0,
);
$items ["admin-tools/content/files"] = array(
"title" => "Public Files",
"page_callback" => 'fp_render_form',
'page_arguments' => array('content_public_files_form'),
"access_arguments" => array("admin_public_files"),
"page_settings" => array(
"page_show_title" => TRUE,
"menu_links" => array(
0 => array(
"text" => t("Admin Tools"),
"path" => "admin-tools",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
'type' => MENU_TYPE_TAB,
'tab_family' => 'content_man_tabs',
"weight" => 10,
);
/*
$items["content/delete"] = array(
"page_callback" => "content_handle_delete_content",
"access_arguments" => array("admin_content"),
"type" => MENU_TYPE_CALLBACK,
);
*/
// content/add/TYPE
$items ["content/add/%"] = array(
"page_callback" => "fp_render_form",
"page_arguments" => array("content_edit_content_form", "", 2, "new"),
"access_callback" => "content_user_access",
"access_arguments" => array("add", 2),
"type" => MENU_TYPE_NORMAL_ITEM,
"page_settings" => array(
"menu_links" => array(
0 => array(
"text" => t("Admin Tools"),
"path" => "admin-tools",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Content",
"path" => "admin-tools/content",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
);
// Add content/add/TYPE/ with multiple wildcards for future module developers. Ex:
// in hook_form_alter, using the arg() function to find out what these values are.
$items ["content/add/%/%"] = $items ["content/add/%"];
$items ["content/add/%/%/%"] = $items ["content/add/%"];
$items ["content/add/%/%/%/%"] = $items ["content/add/%"];
$items ["content/add/%/%/%/%/%"] = $items ["content/add/%"];
$items ["content/add/%/%/%/%/%/%"] = $items ["content/add/%"];
$items ["content/%"] = array(
"title" => "View",
"page_callback" => "content_view_content",
"page_arguments" => array(1),
"access_callback" => "content_user_access",
"access_arguments" => array("view", 1),
"page_settings" => array(
"page_show_title" => TRUE,
"menu_links" => array(
0 => array(
"text" => t("Admin Tools"),
"path" => "admin-tools",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Content",
"path" => "admin-tools/content",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_TAB,
"tab_family" => "content",
"weight" => 10,
);
$items ["content/%/edit"] = array(
"title" => "Edit",
"page_callback" => "fp_render_form",
"page_arguments" => array("content_edit_content_form", "", "", 1),
"access_callback" => "content_user_access",
"access_arguments" => array("edit", 1),
"page_settings" => array(
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => t("Admin Tools"),
"path" => "admin-tools",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Content",
"path" => "admin-tools/content",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_TAB,
"tab_family" => "content",
"weight" => 20,
);
$items ["content/%/devel"] = array(
"title" => "Devel",
"page_callback" => "content_display_devel",
"page_arguments" => array(1),
"access_arguments" => array("view_fpm_debug"),
"page_settings" => array(
"page_hide_report_error" => TRUE,
"menu_links" => array(
0 => array(
"text" => t("Admin Tools"),
"path" => "admin-tools",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
1 => array(
"text" => "Content",
"path" => "admin-tools/content",
"query" => "de_catalog_year=%DE_CATALOG_YEAR%",
),
),
),
"type" => MENU_TYPE_TAB,
"tab_family" => "content",
"weight" => 30,
);
$items ['content/%/remove'] = array(
"page_callback" => "fp_render_form",
"page_arguments" => array("content_unpublish_content_form", "", 1),
"access_callback" => "content_user_access",
"access_arguments" => array("edit", 1), // since we are editing the published field, we simply check for "edit"
);
$items ["content-files/handle-download/%"] = array(
"page_callback" => "content_files_handle_download",
"page_arguments" => array(2),
"access_callback" => "content_files_user_may_download_file",
"access_arguments" => array(2),
"type" => MENU_TYPE_CALLBACK,
);
/**
* Generic screen which, if we have saved content from within an iframe dialog,
* we want to display a "success" message, then just refresh the screen.
*/
$items ["content-dialog-handle-after-save"] = array(
"page_callback" => "content_dialog_handle_after_save",
"access_callback" => TRUE,
"page_settings" => array(
"display_currently_advising" => FALSE,
"screen_mode" => "not_advising",
"page_is_popup" => TRUE,
),
"type" => MENU_TYPE_CALLBACK,
);
return $items;
}