function yandex_metrics_reports_get_active_list in Yandex.Metrics 8.2
Same name and namespace in other branches
- 8.3 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()
- 6.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()
- 7.3 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()
- 7.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_active_list()
Returns list of available and enabled reports only.
Return value
array
1 call to yandex_metrics_reports_get_active_list()
- YandexMetricsReportsController::report in yandex_metrics_reports/
src/ Controller/ YandexMetricsReportsController.php - Menu callback; displays a Summary page containing reports and charts.
File
- yandex_metrics_reports/
yandex_metrics_reports.module, line 508 - 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 (!variable_get('yandex_metrics_reports_' . $report_name . '_visible', TRUE) || !function_exists($report_data['callback'])) {
unset($reports[$report_name]);
}
}
return $reports;
}