function feed_import_menu in Feed Import 7.3
Same name and namespace in other branches
- 7 feed_import.module \feed_import_menu()
- 7.2 feed_import.module \feed_import_menu()
Implements hook_menu().
File
- ./
feed_import.module, line 28 - User interface, cron functions for feed_import module
Code
function feed_import_menu() {
// FEED_IMPORT_PATH is defined at the top of this file.
// This is used for arguments to know the position.
$submenus = substr_count(FEED_IMPORT_PATH, '/');
$feedarg = $submenus + 2;
$access = array(
'access callback' => 'user_access',
'access arguments' => array(
'feed import',
),
);
$items = array();
$items[FEED_IMPORT_PATH] = array(
'title' => 'Feed Import',
'description' => 'Configure feed import',
'page callback' => 'feed_import_list_feeds',
'type' => MENU_NORMAL_ITEM,
) + $access;
$items[FEED_IMPORT_PATH . '/add'] = array(
'title' => 'Add feed',
'description' => 'Adds a new feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_feed_form',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 1,
) + $access;
$items[FEED_IMPORT_PATH . '/import'] = array(
'title' => 'Import feed',
'description' => 'Imports a feed from JSON code',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_import_feed_form',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 2,
) + $access;
$items[FEED_IMPORT_PATH . '/process/%feed_import'] = array(
'title' => 'Process feed',
'page callback' => 'feed_import_process_feed',
'access callback' => 'user_access',
'access arguments' => array(
'feed import process',
),
'page arguments' => array(
$feedarg,
),
'type' => MENU_CALLBACK,
);
$items[FEED_IMPORT_PATH . '/export/%feed_import'] = array(
'title' => 'Export feed',
'page callback' => 'feed_import_export_feed',
'page arguments' => array(
$feedarg,
),
'type' => MENU_CALLBACK,
) + $access;
$items[FEED_IMPORT_PATH . '/delete/%feed_import'] = array(
'title' => 'Export feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_delete_feed_form',
$feedarg,
),
'type' => MENU_CALLBACK,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/feed'] = array(
'title' => 'Edit feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_feed_form',
$feedarg,
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%',
'weight' => 1,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/feed/feed'] = array(
'title' => 'Feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_feed_form',
$feedarg,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/feed',
'weight' => 1,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/feed/processor'] = array(
'title' => 'Processor',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_class_settings_form',
$feedarg,
'processor',
'Edit processor',
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/feed',
'weight' => 2,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/feed/hashmanager'] = array(
'title' => 'Hash Manager',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_class_settings_form',
$feedarg,
'hashes',
'Edit Hash Manager',
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/feed',
'weight' => 3,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/source'] = array(
'title' => 'Edit source',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_class_settings_form',
$feedarg,
'reader',
'Edit source',
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%',
'weight' => 2,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/fields'] = array(
'title' => 'Edit fields',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_fields_form',
$feedarg,
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%',
'weight' => 3,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/fields/fields'] = array(
'title' => 'Edit fields',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_fields_form',
$feedarg,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/fields',
'weight' => 1,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/fields/reorder'] = array(
'title' => 'Re-order fields',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_reorder_fields_form',
$feedarg,
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/fields',
'weight' => 2,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/fields/static'] = array(
'title' => 'Edit static fields',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_static_fields_form',
$feedarg,
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/fields',
'weight' => 3,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/filters'] = array(
'title' => 'Edit filters',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_filter_form',
$feedarg,
'filters',
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%',
'weight' => 4,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/filters/filters'] = array(
'title' => 'Edit filters',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_filter_form',
$feedarg,
'filters',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/filters',
'weight' => 1,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/filters/prefilters'] = array(
'title' => 'Edit pre-filters',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_filter_form',
$feedarg,
'prefilters',
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/filters',
'weight' => 2,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/filters/functions'] = array(
'title' => 'Dynamic filters',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_dynamic_func_form',
$feedarg,
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/filters',
'weight' => 3,
) + $access;
$items[FEED_IMPORT_PATH . '/edit/%feed_import/filters/settings'] = array(
'title' => 'Filter settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_class_settings_form',
$feedarg,
'filter',
'Filter settings',
),
'type' => MENU_LOCAL_TASK,
'tab_parent' => FEED_IMPORT_PATH . '/edit/%/filters',
'weight' => 4,
) + $access;
return $items;
}