You are here

function yandex_metrics_reports_get_active_list in Yandex.Metrics 8.3

Same name and namespace in other branches
  1. 8.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()
  2. 6.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()
  3. 7.3 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()
  4. 7.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()

Returns list of available and enabled reports only.

1 call to yandex_metrics_reports_get_active_list()
yandex_metrics_reports_report in yandex_metrics_reports/yandex_metrics_reports.module
Menu callback; displays a Summary page containing reports and charts.

File

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

Code

function yandex_metrics_reports_get_active_list() {
  $reports = yandex_metrics_reports_get_list();
  foreach ($reports as $report_name => $report_data) {
    if (isset($report_data['visible']) && !$report_data['visible'] || !function_exists($report_data['callback'])) {
      unset($reports[$report_name]);
    }
  }
  return $reports;
}