You are here

function yandex_metrics_menu in Yandex.Metrics 6

Same name and namespace in other branches
  1. 6.2 yandex_metrics.module \yandex_metrics_menu()
  2. 7.3 yandex_metrics.module \yandex_metrics_menu()
  3. 7 yandex_metrics.module \yandex_metrics_menu()
  4. 7.2 yandex_metrics.module \yandex_metrics_menu()

Implementation of hook_menu().

File

./yandex_metrics.module, line 38
The main code of Yandex.Metrics module.

Code

function yandex_metrics_menu() {
  $items['yandex_metrics/oauth'] = array(
    'access arguments' => array(
      'administer Yandex.Metrics settings',
    ),
    'page callback' => 'yandex_metrics_oauth_callback',
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/yandex_metrics'] = array(
    'access arguments' => array(
      'administer Yandex.Metrics settings',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'yandex_metrics_main_settings',
    ),
    'title' => 'Yandex.Metrics',
    'type' => MENU_NORMAL_ITEM,
    'description' => 'Integrate your site with Yandex.Metrics service.',
  );
  $items['admin/settings/yandex_metrics/counter'] = array(
    'access arguments' => array(
      'administer Yandex.Metrics settings',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'yandex_metrics_main_settings',
    ),
    'title' => 'Counter Code',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/settings/yandex_metrics/authorization'] = array(
    'access arguments' => array(
      'administer Yandex.Metrics settings',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'yandex_metrics_authorization',
    ),
    'title' => 'Authorization',
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  $items['admin/settings/yandex_metrics/reports'] = array(
    'access arguments' => array(
      'administer Yandex.Metrics settings',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'yandex_metrics_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_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_report',
    'page arguments' => array(
      3,
    ),
    'title' => 'Yandex.Metrics Summary Report',
    'load arguments' => array(
      3,
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/yandex_metrics_ajax/%/%/%'] = array(
    'access arguments' => array(
      'access Yandex.Metrics report',
    ),
    'page callback' => 'yandex_metrics_ajax',
    'page arguments' => array(
      2,
      3,
      4,
    ),
    'load arguments' => array(
      2,
      3,
      4,
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}