function statisticsDisplayCallback($hookName, $params)
{
$smarty =& $params[1];
$output =& $params[2];
$pubObjectId = $this->getPubObjectId($smarty);
list($statsByRepresentation, $statsByMonth, $statsYears) = $this->_getDownloadStats($pubObjectId);
$smarty->assign('statsYears', $statsYears);
end($statsYears);
$smarty->assign('year', key($statsYears));
$smarty->assign('statistics', json_encode(array('byRepresentation' => $statsByRepresentation, 'byMonth' => $statsByMonth)));
$smarty->assign('labels', json_encode(explode(' ', __('plugins.generic.usageStats.monthInitials'))));
$smarty->assign('chartType', $this->getSetting(CONTEXT_ID_NONE, 'chartType'));
$smarty->assign('datasetMaxCount', $this->getSetting(CONTEXT_ID_NONE, 'datasetMaxCount'));
$metricsHTML = $smarty->fetch($this->getTemplatePath(true) . 'outputBackend.tpl');
$output .= $metricsHTML;
return false;
}