[], 'ungrouped' => []]; $requestUri = '/' . ltrim(Request::pathWithQuery(), '/'); $localePath = (string) (parse_url(localeBase(), PHP_URL_PATH) ?? '/'); $localePath = Request::stripBasePath($localePath); $localeBasePath = '/' . trim($localePath, '/'); if ($localeBasePath !== '/') { $localeBasePath .= '/'; } $currentPath = BookmarkUrlNormalizer::canonicalizeRequestUri($requestUri, $localeBasePath); return [ 'bookmarks.nav' => [ 'grouped' => $grouped, 'current_path' => $currentPath, ], ]; } }