function yandex_metrics_reports_menu in Yandex.Metrics 8.3
Same name and namespace in other branches
- 6.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_menu()
- 7.3 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_menu()
- 7.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_menu()
Implements hook_menu().
File
- yandex_metrics_reports/
yandex_metrics_reports.module, line 36 - The main code of Yandex.Metrics Reports module.
Code
function yandex_metrics_reports_menu() {
// Display fake Authorization tab in case if
// we have yandex_services_auth module installed.
if (module_exists('yandex_services_auth')) {
$items['admin/config/system/yandex_metrics/authorization'] = array(
// The yandex_services_auth module requires
// 'administer site configuration' permission.
'access arguments' => array(
'administer Yandex.Metrics settings',
),
'page callback' => 'drupal_goto',
'page arguments' => array(
'admin/config/system/yandex_services_auth',
),
'title' => 'Authorization',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
}
$items['admin/config/system/yandex_metrics/reports'] = array(
'access arguments' => array(
'administer Yandex.Metrics settings',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'yandex_metrics_reports_reports',
),
'title' => 'Reports',
'type' => MENU_LOCAL_TASK,
'weight' => 3,
);
$items['admin/reports/yandex_metrics_summary'] = array(
'access arguments' => array(
'access Yandex.Metrics report',
),
'page callback' => 'yandex_metrics_reports_report',
'title' => 'Yandex.Metrics Summary Report',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/reports/yandex_metrics_summary/%'] = array(
'access arguments' => array(
'access Yandex.Metrics report',
),
'page callback' => 'yandex_metrics_reports_report',
'page arguments' => array(
3,
),
'title' => 'Yandex.Metrics Summary Report',
'title callback' => 'yandex_metrics_reports_summary_page_title_callback',
'title arguments' => array(
3,
),
'load arguments' => array(
3,
),
'type' => MENU_CALLBACK,
);
return $items;
}