Returns information about a menu item. The result is an array
with the following keys:
- url - the menu item URL. Not required for menu item types that return all available records.
The URL should be returned relative to the website root and include the subdirectory, if any.
Use the Url::to() helper to generate the URLs.
- isActive - determines whether the menu item is active. Not required for menu item types that
return all available records.
- items - an array of arrays with the same keys (url, isActive, items) + the title key.
The items array should be added only if the $item's $nesting property value is TRUE.
public static resolveMenuItem ( RainLab\Pages\Classes\MenuItem $item, string $url, Cms\Classes\Theme $theme ) : mixed | ||
$item | RainLab\Pages\Classes\MenuItem | Specifies the menu item. |
$url | string | Specifies the current page URL, normalized, in lower case The URL is specified relative to the website root, it includes the subdirectory name, if any. |
$theme | Cms\Classes\Theme | Specifies the current theme. |
리턴 | mixed | Returns an array. Returns null if the item cannot be resolved. |