admin: docgen admin

This commit is contained in:
nobohan
2022-05-10 13:55:33 +02:00
parent be27df1fd5
commit cb1bbe940f
9 changed files with 27 additions and 26 deletions

View File

@@ -33,19 +33,18 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
if ($this->security->isGranted('ROLE_ADMIN')) {
if (in_array($menuId, ['admin_index', 'admin_section'], true)) {
$menu->addChild($this->translator->trans('docgen.Document generation'), [
'route' => 'chill_crud_docgen_template_index',
])->setExtras([
'order' => 350,
'explain' => 'docgen.Manage templates and document generation',
]);
}
$menu->addChild($this->translator->trans('docgen.Document generation'), [
'route' => 'chill_crud_docgen_template_index',
])->setExtras([
'order' => 4020,
'explain' => 'docgen.Manage templates and document generation',
]);
}
}
public static function getMenuIds(): array
{
return ['admin_index', 'admin_section', 'docgen_admin'];
return ['admin_section', 'admin_docstore'];
}
}