Added an menu to show some simple statistics.

This commit is contained in:
Jan Böhmer 2020-02-10 23:26:45 +01:00
parent 15957203af
commit f79975832a
7 changed files with 454 additions and 4 deletions

View file

@ -58,8 +58,8 @@ class ToolsTreeBuilder
protected $security;
public function __construct(TranslatorInterface $translator, UrlGeneratorInterface $urlGenerator,
TagAwareCacheInterface $treeCache, UserCacheKeyGenerator $keyGenerator,
Security $security)
TagAwareCacheInterface $treeCache, UserCacheKeyGenerator $keyGenerator,
Security $security)
{
$this->translator = $translator;
$this->urlGenerator = $urlGenerator;
@ -187,6 +187,13 @@ class ToolsTreeBuilder
);
}
if ($this->security->isGranted('@tools.statistics')) {
$show_nodes[] = new TreeViewNode(
$this->translator->trans('tree.tools.show.statistics'),
$this->urlGenerator->generate('statistics_view')
);
}
return $show_nodes;
}