function feed_import_menu in Feed Import 7
Same name and namespace in other branches
- 7.3 feed_import.module \feed_import_menu()
- 7.2 feed_import.module \feed_import_menu()
Implements hook_menu().
File
- ./
feed_import.module, line 43 - 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, '/');
$items = array();
$items[FEED_IMPORT_PATH] = array(
'title' => 'Feed Import',
'description' => 'Configure feed import',
'page callback' => 'feed_import_list_feeds',
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_NORMAL_ITEM,
);
$items[FEED_IMPORT_PATH . '/add'] = array(
'title' => 'Add new feed',
'description' => 'Add a new feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_add_new_feed_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 1,
);
$items[FEED_IMPORT_PATH . '/import'] = array(
'title' => 'Import feed',
'description' => 'Import an existing feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_import_feed_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 2,
);
$items[FEED_IMPORT_PATH . '/export/all'] = array(
'title' => 'Export all feeds',
'description' => 'Exports all feeds',
'page callback' => 'feed_import_export_feed_page',
'page arguments' => array(
$submenus + 2,
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 3,
);
$items[FEED_IMPORT_PATH . '/settings'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_settings_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 4,
);
$items[FEED_IMPORT_PATH . '/export/%'] = array(
'title' => 'Export feeds',
'description' => 'Export feeds',
'page callback' => 'feed_import_export_feed_page',
'page arguments' => array(
$submenus + 2,
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_CALLBACK,
);
$items[FEED_IMPORT_PATH . '/process'] = array(
'title' => 'Process feed',
'page callback' => 'feed_import_process_feed',
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_CALLBACK,
);
$items[FEED_IMPORT_PATH . '/enable'] = array(
'title' => 'Enable feed',
'page callback' => 'feed_import_change_status',
'page arguments' => array(
'enable',
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_CALLBACK,
);
$items[FEED_IMPORT_PATH . '/disable'] = array(
'title' => 'Disable feed',
'page callback' => 'feed_import_change_status',
'page arguments' => array(
'disable',
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_CALLBACK,
);
$items[FEED_IMPORT_PATH . '/delete'] = array(
'title' => 'Delete feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_delete_feed_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_CALLBACK,
);
$items[FEED_IMPORT_PATH . '/edit/%/feed'] = array(
'title' => 'Edit feed',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_feed_form',
$submenus + 2,
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_LOCAL_TASK,
'tab_root' => FEED_IMPORT_PATH . '/edit/%',
'weight' => 1,
);
$items[FEED_IMPORT_PATH . '/edit/%/pre-filter'] = array(
'title' => 'Edit pre-filters',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_filter_form',
'#pre_filter',
$submenus + 2,
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_LOCAL_TASK,
'tab_root' => FEED_IMPORT_PATH . '/edit/%',
'weight' => 2,
);
$items[FEED_IMPORT_PATH . '/edit/%/filter'] = array(
'title' => 'Edit filters',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'feed_import_edit_filter_form',
'#filter',
$submenus + 2,
),
'access callback' => 'user_access',
'access arguments' => array(
'feed import permission',
),
'type' => MENU_LOCAL_TASK,
'tab_root' => FEED_IMPORT_PATH . '/edit/%',
'weight' => 3,
);
return $items;
}