Skip to content

Commit

Permalink
Fix route options parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gengar-i committed Mar 13, 2024
1 parent 404282d commit ae9ccbf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function createStructure(array $options): ItemInterface
{
/** @var \Knp\Menu\ItemInterface|\Knp\Menu\ItemInterface[] $menu */
$menu = $this->factory->createItem('root');
$route = $options['route'];
$route = $options['route'] ?? 'ibexa.user_settings.list';

$saveItem = $this->createMenuItem(
self::ITEM__SAVE,
Expand All @@ -70,7 +70,7 @@ public function createStructure(array $options): ItemInterface
'class' => 'ibexa-btn--trigger',
'data-click' => '#user_setting_update_update',
],
'route' => $route ?? 'ibexa.user_settings.list',
'route' => $route,
'routeParameters' => [
'contentId' => $options['content_id'] ?? null,
'versionNo' => $options['version_no'] ?? null,
Expand All @@ -97,7 +97,7 @@ public function createStructure(array $options): ItemInterface
self::ITEM__CANCEL => $this->createMenuItem(
self::ITEM__CANCEL,
[
'route' => $route ?? 'ibexa.user_settings.list',
'route' => $route,
'routeParameters' => [
'contentId' => $options['content_id'] ?? null,
'versionNo' => $options['version_no'] ?? null,
Expand Down

0 comments on commit ae9ccbf

Please sign in to comment.