admin: add menu for languages and countries section

This commit is contained in:
nobohan
2022-05-03 09:27:04 +02:00
parent 4c99abd6d3
commit 04f27cc555
8 changed files with 69 additions and 4 deletions

View File

@@ -51,6 +51,15 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
'order' => 205,
'explain' => 'Configure location and location type',
]);
$menu->addChild('Languages and countries', [
'route' => 'chill_main_admin_language_country',
])
->setExtras([
'icons' => ['key'],
'order' => 210,
'explain' => 'Configure languages and countries',
]);
}
public static function getMenuIds(): array

View File

@@ -0,0 +1,33 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Routing\MenuBuilder;
use Knp\Menu\MenuItem;
class LanguageCountryMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface
{
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
$menu->addChild('Language list', [
'route' => 'chill_crud_main_language_index',
])->setExtras(['order' => 205]);
$menu->addChild('Country list', [
'route' => 'chill_crud_main_country_index',
])->setExtras(['order' => 206]);
}
public static function getMenuIds(): array
{
return ['admin_language_country'];
}
}