mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
admin: add menu for languages and countries section
This commit is contained in:
@@ -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
|
||||
|
@@ -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'];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user