function yandex_metrics_reports_get_list in Yandex.Metrics 8.3
Same name and namespace in other branches
- 8.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_list()
- 6.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_list()
- 7.3 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_list()
- 7.2 yandex_metrics_reports/yandex_metrics_reports.module \yandex_metrics_reports_get_list()
Returns list of all reports.
4 calls to yandex_metrics_reports_get_list()
- yandex_metrics_reports_get_active_list in yandex_metrics_reports/
yandex_metrics_reports.module - Returns list of available and enabled reports only.
- yandex_metrics_reports_render_report in yandex_metrics_reports/
yandex_metrics_reports.module - Callback that prints content of one of the 4 reports.
- yandex_metrics_reports_reports in yandex_metrics_reports/
yandex_metrics_reports.module - Menu callback. Reports setting form.
- yandex_metrics_reports_reports_submit in yandex_metrics_reports/
yandex_metrics_reports.module - Submit handler for yandex_metrics_reports_reports form.
File
- yandex_metrics_reports/
yandex_metrics_reports.module, line 617 - The main code of Yandex.Metrics Reports module.
Code
function yandex_metrics_reports_get_list($reset = FALSE) {
$reports =& drupal_static(__FUNCTION__);
if (!isset($reports) || $reset) {
// Permanent cache.
$cache = variable_get('yandex_metrics_reports_list');
if ($cache === NULL || $reset) {
$reports = array();
foreach (module_implements('yandex_metrics_reports_list') as $module) {
$module_report_list = module_invoke($module, 'yandex_metrics_reports_list');
if (isset($module_report_list) && is_array($module_report_list)) {
$reports = array_merge($reports, $module_report_list);
}
}
// Allow other modules to alter reports list before caching.
drupal_alter('yandex_metrics_reports_list', $reports);
yandex_metrics_reports_sort_and_save($reports);
}
else {
$reports = $cache;
}
}
return $reports;
}