function piwik_reports_menu in Piwik Reports 7.3
Same name and namespace in other branches
- 6 piwik_reports.module \piwik_reports_menu()
- 7.4 piwik_reports.module \piwik_reports_menu()
- 7.2 piwik_reports.module \piwik_reports_menu()
Implements hook_menu().
File
- ./
piwik_reports.module, line 41 - Defines features and functions common to Piwik Reports.
Code
function piwik_reports_menu() {
// Reports:
$items['admin/reports/piwik_reports'] = array(
'title' => 'Piwik Web Analytics',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'visitors_overview',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'description' => 'Reports on your website visitors, your popular pages, the search engines keywords they used... and so much more.',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/reports/piwik_reports/visitors'] = array(
'title' => 'Visitors',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'visitors_overview',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/visitors/overview'] = array(
'title' => 'Overview',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'visitors_overview',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/visitors/settings'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'visitors_settings',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/visitors/times'] = array(
'title' => 'Times',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'visitors_times',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/visitors/locations'] = array(
'title' => 'Locations Provider',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'visitors_locations',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 4,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/visitors/variables'] = array(
'title' => 'Custom Variables',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'custom_variables',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 5,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/actions'] = array(
'title' => 'Actions',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'actions_pageurls',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/actions/pages'] = array(
'title' => 'Pages',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'actions_pageurls',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/actions/entrypages'] = array(
'title' => 'Entry Pages',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'actions_entryurls',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/actions/exitpages'] = array(
'title' => 'Exit Pages',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'actions_exiturls',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/actions/sitesearch'] = array(
'title' => 'Site Search',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'actions_sitesearch',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/actions/outlinks'] = array(
'title' => 'Outlinks',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'actions_outlinks',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/actions/downloads'] = array(
'title' => 'Downloads',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'actions_downloads',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 4,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/referrers'] = array(
'title' => 'Referrers',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'referrers_overview',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/referrers/overview'] = array(
'title' => 'Overview',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'referrers_overview',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/referrers/search'] = array(
'title' => 'Search Engines & Keywords',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'referrers_search',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/referrers/websites'] = array(
'title' => 'Websites',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'referrers_websites',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);
$items['admin/reports/piwik_reports/goals'] = array(
'title' => 'Goals',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_reports',
'goals',
),
'access arguments' => array(
'access piwik reports',
),
'file' => 'piwik_reports.pages.inc',
'weight' => 4,
'type' => MENU_LOCAL_TASK,
);
// If piwik is installed, group with it, otherwise not.
if (module_exists('piwik')) {
$items['admin/config/system/piwik/tracking'] = array(
'title' => 'Tracking',
'type' => MENU_NORMAL_ITEM,
'description' => 'Configure the settings used to generate your Piwik tracking code.',
'page callback' => 'drupal_get_form',
'access arguments' => array(
'administer piwik',
),
'page arguments' => array(
'piwik_admin_settings_form',
),
'file path' => drupal_get_path('module', 'piwik'),
'file' => 'piwik.admin.inc',
);
$items['admin/config/system/piwik/reports'] = array(
'title' => 'Reports',
'description' => 'Configure the settings for your Piwik reports.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_admin_settings_form',
),
'access arguments' => array(
'administer piwik reports',
),
'type' => MENU_NORMAL_ITEM,
'weight' => 10,
);
}
else {
$items['admin/config/system/piwik_reports'] = array(
'title' => 'Piwik Reports',
'description' => 'Configure the settings for your Piwik reports.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'piwik_reports_admin_settings_form',
),
'access arguments' => array(
'administer piwik reports',
),
'type' => MENU_NORMAL_ITEM,
);
}
return $items;
}