function getMetricTypes($withDisplayNames = false)
{
// Retrieve report plugins enabled for this journal.
$reportPlugins =& PluginRegistry::loadCategory('reports', true, $this->getId());
if (!is_array($reportPlugins)) {
return array();
}
// Run through all report plugins and retrieve all supported metrics.
$metricTypes = array();
foreach ($reportPlugins as $reportPlugin) {
$pluginMetricTypes = $reportPlugin->getMetricTypes();
if ($withDisplayNames) {
foreach ($pluginMetricTypes as $metricType) {
$metricTypes[$metricType] = $reportPlugin->getMetricDisplayType($metricType);
}
} else {
$metricTypes = array_merge($metricTypes, $pluginMetricTypes);
}
}
return $metricTypes;
}