mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 08:33:49 +00:00
create tests (with app/kernel fixtures) for menu composer #217
This commit is contained in:
@@ -45,15 +45,15 @@ class MenuComposer
|
||||
{
|
||||
$routes = array();
|
||||
|
||||
foreach ($this->routeCollection->all() as $key => $route) {
|
||||
foreach ($this->routeCollection->all() as $routeKey => $route) {
|
||||
if ($route->hasOption('menus')) {
|
||||
foreach ($route->getOption('menus') as $key => $params) {
|
||||
if ($menuId === $key) {
|
||||
foreach ($route->getOption('menus') as $menuKey => $params) {
|
||||
if ($menuId === $menuKey) {
|
||||
$route = array();
|
||||
$route['route'] = $key;
|
||||
$route['route'] = $routeKey;
|
||||
$route['label'] = $params['label'];
|
||||
$route['helper'] =
|
||||
(isset($params['helper'])) ? $params['helper'] : '';
|
||||
(isset($params['helper'])) ? $params['helper'] : null;
|
||||
|
||||
//add route to the routes array, avoiding duplicate 'order'
|
||||
// to erase previously added
|
||||
|
Reference in New Issue
Block a user