You are here

function yandex_metrics_reports in Yandex.Metrics 7

Same name and namespace in other branches
  1. 6 yandex_metrics.module \yandex_metrics_reports()

Menu callback. Reports setting form.

Return value

array

1 string reference to 'yandex_metrics_reports'
yandex_metrics_menu in ./yandex_metrics.module
Implementation of hook_menu().

File

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

Code

function yandex_metrics_reports() {
  $form = array();
  $form['yandex_metrics_use_ajax'] = array(
    '#type' => 'checkbox',
    '#title' => t('Load reports via AJAX'),
    '#default_value' => variable_get('yandex_metrics_use_ajax', FALSE),
  );
  $form['reports'] = array(
    '#type' => 'fieldset',
    '#title' => t('Reports visibility settings'),
    '#description' => t('Choose reports to display on Yandex.Metrics Summary Report page.'),
  );
  $form['reports']['yandex_metrics_visits_chart_visible'] = array(
    '#type' => 'checkbox',
    '#title' => t('Page Views, Visitors, New Visitors'),
    '#default_value' => variable_get('yandex_metrics_visits_chart_visible', TRUE),
  );
  $form['reports']['yandex_metrics_sources_chart_visible'] = array(
    '#type' => 'checkbox',
    '#title' => t('Traffic Sources'),
    '#default_value' => variable_get('yandex_metrics_sources_chart_visible', TRUE),
  );
  $form['reports']['yandex_metrics_search_phrases_visible'] = array(
    '#type' => 'checkbox',
    '#title' => t('Popular Search Phrases'),
    '#default_value' => variable_get('yandex_metrics_search_phrases_visible', TRUE),
  );
  $form['reports']['yandex_metrics_popular_content_visible'] = array(
    '#type' => 'checkbox',
    '#title' => t('Popular Content'),
    '#default_value' => variable_get('yandex_metrics_popular_content_visible', TRUE),
  );
  $form['reports']['yandex_metrics_geo_chart_visible'] = array(
    '#type' => 'checkbox',
    '#title' => t('Geography of Visits'),
    '#default_value' => variable_get('yandex_metrics_geo_chart_visible', FALSE),
  );
  return system_settings_form($form);
}