You are here

function yandex_metrics_reports_reports in Yandex.Metrics 7.2

Same name and namespace in other branches
  1. 8.3 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_reports()
  2. 6.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_reports()
  3. 7.3 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_reports()

Menu callback. Reports setting form.

Return value

array

1 string reference to 'yandex_metrics_reports_reports'
yandex_metrics_reports_menu in yandex_metrics_reports/yandex_metrics_reports.module
Implements hook_menu().

File

yandex_metrics_reports/yandex_metrics_reports.module, line 509
The main code of Yandex.Metrics Reports module.

Code

function yandex_metrics_reports_reports() {
  $form = array();
  $form['reports'] = array(
    '#type' => 'fieldset',
    '#title' => t('Reports visibility settings'),
    '#description' => t('Choose reports to display on Yandex.Metrics Summary Report page.'),
  );
  $reports = yandex_metrics_reports_get_list(TRUE);
  foreach ($reports as $report_name => $report_data) {
    $form['reports']['yandex_metrics_reports_' . $report_name . '_visible'] = array(
      '#type' => 'checkbox',
      '#title' => $report_data['title'],
      '#default_value' => variable_get('yandex_metrics_reports_' . $report_name . '_visible', TRUE),
    );
  }
  return system_settings_form($form);
}