function mostpopular_menu in Drupal Most Popular 7
Same name and namespace in other branches
- 6 mostpopular.module \mostpopular_menu()
Implements hook_menu().
File
- ./
mostpopular.module, line 65 - The main file for the Most Popular module.
Code
function mostpopular_menu() {
$items = array();
$items['admin/config/mostpopular'] = array(
'title' => 'Most Popular',
'description' => 'Configure the Most Popular block functionality.',
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array(
'administer mostpopular',
),
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),
'position' => 'right',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/config/mostpopular/config'] = array(
'title' => 'Settings',
'description' => 'Basic settings for all Most Popular blocks.',
'page callback' => 'drupal_get_form',
'file' => 'mostpopular.admin.inc',
'page arguments' => array(
'mostpopular_settings_form',
),
'access arguments' => array(
'administer mostpopular',
),
'type' => MENU_LOCAL_TASK | MENU_VISIBLE_IN_TREE,
'weight' => 0,
);
$items['admin/config/mostpopular/blocks'] = array(
'title' => 'Blocks',
'description' => 'Configure the available Most Popular blocks.',
'file' => 'mostpopular.blocks.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mostpopular_blocks_admin_form',
),
'access arguments' => array(
'administer mostpopular',
),
'type' => MENU_LOCAL_TASK | MENU_VISIBLE_IN_TREE,
'weight' => 5,
);
$items['admin/config/mostpopular/services'] = array(
'title' => 'Services',
'description' => 'Configure the services available in each Most Popular block.',
'file' => 'mostpopular.services.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mostpopular_services_admin_form',
),
'access arguments' => array(
'administer mostpopular',
),
'type' => MENU_LOCAL_TASK | MENU_VISIBLE_IN_TREE,
'weight' => 10,
);
$items['admin/config/mostpopular/services/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -50,
);
$items['admin/config/mostpopular/services/%/edit'] = array(
'title callback' => 'mostpopular_service_title',
'title arguments' => array(
4,
),
'file' => 'mostpopular.services.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mostpopular_service_config_form',
4,
),
'access arguments' => array(
'administer mostpopular',
),
'type' => MENU_NORMAL_ITEM,
'context' => MENU_CONTEXT_INLINE | MENU_CONTEXT_PAGE,
);
$items['admin/config/mostpopular/services/%/delete'] = array(
'title' => 'Delete',
'file' => 'mostpopular.services.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mostpopular_service_delete_form',
4,
),
'access arguments' => array(
'administer mostpopular',
),
'type' => MENU_NORMAL_ITEM,
'context' => MENU_CONTEXT_INLINE | MENU_CONTEXT_PAGE,
);
$items['admin/config/mostpopular/intervals'] = array(
'title' => 'Intervals',
'description' => 'Configure the intervals of time used for each Most Popular block.',
'file' => 'mostpopular.intervals.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mostpopular_intervals_admin_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer mostpopular',
),
'type' => MENU_LOCAL_TASK | MENU_VISIBLE_IN_TREE,
'weight' => 20,
);
$items['admin/config/mostpopular/refresh'] = array(
'title' => 'Refresh Stats',
'description' => 'Refresh the Most Popular stats.',
'page callback' => 'mostpopular_refresh',
'access callback' => 'user_access',
'access arguments' => array(
'administer mostpopular',
),
'type' => MENU_LOCAL_TASK | MENU_VISIBLE_IN_TREE,
'weight' => 30,
);
$items['mostpopular/ajax/%/%/%'] = array(
'title' => 'Get the most popular stats via AJAX',
'page callback' => 'mostpopular_items_ajax',
'page arguments' => array(
2,
3,
4,
),
'access callback' => 'user_access',
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
return $items;
}