function feeds_menu in Feeds 8.2
Same name and namespace in other branches
- 6 feeds.module \feeds_menu()
- 7.2 feeds.module \feeds_menu()
- 7 feeds.module \feeds_menu()
Implements hook_menu().
Related topics
File
- ./
feeds.module, line 289 - Feeds - basic API functions and hook implementations.
Code
function feeds_menu() {
$items = array();
$items['import'] = array(
'title' => 'Import',
'page callback' => 'feeds_page',
'access callback' => 'feeds_page_access',
'file' => 'feeds.pages.inc',
);
$items['import/%'] = array(
'title callback' => 'feeds_importer_title',
'title arguments' => array(
1,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feeds_import_form',
1,
),
'access callback' => 'feeds_access',
'access arguments' => array(
'import',
1,
),
'file' => 'feeds.pages.inc',
);
$items['import/%/import'] = array(
'title' => 'Import',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['import/%/delete-items'] = array(
'title' => 'Delete items',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feeds_delete_tab_form',
1,
),
'access callback' => 'feeds_access',
'access arguments' => array(
'clear',
1,
),
'file' => 'feeds.pages.inc',
'type' => MENU_LOCAL_TASK,
);
$items['import/%/unlock'] = array(
'title' => 'Unlock',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feeds_unlock_tab_form',
1,
),
'access callback' => 'feeds_access',
'access arguments' => array(
'unlock',
1,
),
'file' => 'feeds.pages.inc',
'type' => MENU_LOCAL_TASK,
);
$items['import/%/template'] = array(
'page callback' => 'feeds_importer_template',
'page arguments' => array(
1,
),
'access callback' => 'feeds_access',
'access arguments' => array(
'import',
1,
),
'file' => 'feeds.pages.inc',
'type' => MENU_CALLBACK,
);
$items['node/%node/import'] = array(
'title' => 'Import',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feeds_import_tab_form',
1,
),
'access callback' => 'feeds_access',
'access arguments' => array(
'import',
1,
),
'file' => 'feeds.pages.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
$items['node/%node/delete-items'] = array(
'title' => 'Delete items',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feeds_delete_tab_form',
NULL,
1,
),
'access callback' => 'feeds_access',
'access arguments' => array(
'clear',
1,
),
'file' => 'feeds.pages.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 11,
);
$items['node/%node/unlock'] = array(
'title' => 'Unlock',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feeds_unlock_tab_form',
NULL,
1,
),
'access callback' => 'feeds_access',
'access arguments' => array(
'unlock',
1,
),
'file' => 'feeds.pages.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 11,
);
// @todo Eliminate this step and thus eliminate clearing menu cache when
// manipulating importers.
foreach (feeds_importer_load_all() as $importer) {
$items += $importer->fetcher
->menuItem();
}
return $items;
}