This is my route
personeelslid_personeelslid_detail:
pattern: /personeelslid/detail/{personeelId}
defaults:
_controller: PersoneelPersoneelslidBundle:Personeelslid:detail
_menu_icon: fa-user
locatiebeheer_kind_detail:
pattern: /locatiebeheer/kind/detail/{kindId}
defaults: { _controller: PersoneelLocatiemanagerBundle:KindDetail:detail }
In my menuBuilder I loop through all routes and fetch for example _menu_icon:
$routeObject = $this->_router->getRouteCollection()->get($route);
$menu_icon = $routeObject->getDefault('_menu_icon');
How can I fetch the variable name personeelId, kindId, etc.. I need te keys so I can set the routeParameter attributes.