Skip to content

Commit

Permalink
Add routePersistence parameter to Page::resolveMenuItem() (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin authored Oct 30, 2024
1 parent aae1c97 commit 9d19d71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/cms/classes/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static function getMenuTypeInfo(string $type)
*
* @param \Winter\Sitemap\Classes\DefinitionItem|\Winter\Pages\Classes\MenuItem $item Specifies the menu item.
*/
public static function resolveMenuItem(object $item, string $url, Theme $theme): ?array
public static function resolveMenuItem(object $item, string $url, Theme $theme, bool $routePersistence = false): ?array
{
$result = null;

Expand All @@ -202,7 +202,7 @@ public static function resolveMenuItem(object $item, string $url, Theme $theme):
}

$controller = Controller::getController() ?: new Controller;
$pageUrl = $controller->pageUrl($item->reference, [], false);
$pageUrl = $controller->pageUrl($item->reference, [], $routePersistence);

$result = [];
$result['url'] = $pageUrl;
Expand Down

0 comments on commit 9d19d71

Please sign in to comment.