You are here

function yandex_metrics_reports_ajax in Yandex.Metrics 8.2

Same name and namespace in other branches
  1. 6.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_ajax()
  2. 7.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_ajax()

Menu callback; outputs content of one of the 4 reports. It is intended for AJAX calls.

Parameters

$counter_id:

$filter:

$type:

Return value

void

File

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

Code

function yandex_metrics_reports_ajax($counter_id, $filter, $type) {
  $output = '';
  $reports = yandex_metrics_reports_get_list();
  if (isset($reports[$type]) && isset($reports[$type]['callback']) && function_exists($reports[$type]['callback'])) {
    $output = call_user_func($reports[$type]['callback'], $counter_id, $filter);
  }
  print $output;
  die;
}