function recipe_menu in Recipe 7.2
Same name and namespace in other branches
- 5 recipe.module \recipe_menu()
- 6 recipe.module \recipe_menu()
- 7 recipe.module \recipe_menu()
Implements hook_menu().
File
- ./
recipe.module, line 201 - Contains functions for Recipe node CRUD and display.
Code
function recipe_menu() {
// Add a tab on the recipe add screen for Recipe Import.
// Need to add 'file path' because some modules render node/add/recipe/std
// even though they shouldn't.
$items['node/add/recipe/std'] = array(
'title' => 'Standard entry',
'weight' => 0,
'file path' => drupal_get_path('module', 'node'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['node/add/recipe/import'] = array(
'title' => 'Recipe Import',
'description' => 'Allows you to create a recipe by pasting various formats into a big text box.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'recipe_import_form',
),
'access callback' => 'recipe_import_myaccess',
'access arguments' => array(
'import recipes',
),
'file' => 'recipe.admin.inc',
'weight' => 1,
'type' => MENU_LOCAL_TASK,
);
$items['recipe'] = array(
'title' => 'Recipes',
'page callback' => 'recipe_landing_page',
'access arguments' => array(
'access content',
),
'file' => 'recipe.landing.page.inc',
);
$items['recipe/ingredient/autocomplete'] = array(
'title' => 'Ingredient autocomplete',
'page callback' => 'recipe_autocomplete_page',
'type' => MENU_CALLBACK,
'access arguments' => array(
'access content',
),
'file' => 'recipe.admin.inc',
);
$items['recipe/export'] = array(
'page callback' => 'recipe_export',
'type' => MENU_CALLBACK,
'access arguments' => array(
'access content',
),
// lower level permissions are handled in recipe_export
'file' => 'recipe.pages.inc',
);
// Recipe configuration and bulk import/export menus.
$items['admin/config/content/recipe'] = array(
'title' => 'Recipe',
'description' => 'Settings that control how the recipe module functions.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'recipe_admin_settings',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'recipe.admin.inc',
'weight' => 0,
);
$items['admin/structure/recipe'] = array(
'title' => 'Recipe bulk import/export',
'description' => 'Export/Import all recipes from this site to/from a supported format.',
'page callback' => 'recipe_export_multi',
'access callback' => 'recipe_export_multi_myaccess',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'recipe.admin.inc',
);
$items['admin/structure/recipe/export_multi'] = array(
'title' => 'Recipe bulk export',
'description' => 'Export all recipes from this site into a supported output format.',
'type' => MENU_DEFAULT_LOCAL_TASK | MENU_LOCAL_TASK,
);
$items['admin/structure/recipe/import_multi'] = array(
'title' => 'Recipe bulk import',
'description' => 'Import all recipes from this site into a supported output format.',
'page callback' => 'recipe_import_multi',
'access callback' => 'recipe_import_multi_myaccess',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_LOCAL_TASK,
'file' => 'recipe.admin.inc',
);
return $items;
}