mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
improve location: admin menu
This commit is contained in:
@@ -55,22 +55,13 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
|
||||
'explain' => "Configure permissions for users"
|
||||
]);
|
||||
|
||||
$menu->addChild('Location', [
|
||||
'route' => 'chill_crud_main_location_index'
|
||||
$menu->addChild('Location and location type', [
|
||||
'route' => 'chill_main_admin_locations'
|
||||
])
|
||||
->setExtras([
|
||||
'icons' => ['key'],
|
||||
'order' => 205,
|
||||
'explain' => "Configure location"
|
||||
]);
|
||||
|
||||
$menu->addChild('Location type', [
|
||||
'route' => 'chill_crud_main_location_type_index'
|
||||
])
|
||||
->setExtras([
|
||||
'icons' => ['key'],
|
||||
'order' => 205,
|
||||
'explain' => "Configure location type"
|
||||
'explain' => "Configure location and location type"
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Routing\MenuBuilder;
|
||||
|
||||
use Knp\Menu\MenuItem;
|
||||
|
||||
class LocationMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getMenuIds(): array
|
||||
{
|
||||
return [ 'admin_location' ];
|
||||
}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
$menu->addChild('Location list', [
|
||||
'route' => 'chill_crud_main_location_index'
|
||||
])->setExtras(['order' => 205]);
|
||||
|
||||
$menu->addChild('Location type list', [
|
||||
'route' => 'chill_crud_main_location_type_index'
|
||||
])->setExtras(['order' => 206]);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user