Jet\Navigation_Menu_Item
It represents a menu item.
Menu overview
| Method | Meaning of |
|---|---|
| public __construct( string $id, string $label ) |
Parameters:
|
| public setData( array $data ) : void |
Sets the menu item based on the data from the definition. Used for internal purposes. |
| public setMenu( Navigation_Menu $menu ) : void |
Sets the menu to which the item belongs. It is used for internal purposes. |
| public getMenu( ) : Navigation_Menu |
Returns the menu to which the item belongs. |
| public getMenuId( ) : string |
Returns the ID of the menu to which the item belongs. |
| public setMenuId( string $menu_id ) : void |
Sets the menu ID to which the item belongs. It is used for internal purposes. |
| public getId( bool $absolute=true ) : string |
Returns the item identifier. If the $absolute parameter is false, then only the partial ID of the item. If the parameter is true and the menu has a parent, then it returns an ID of the form "paren_imenu_id/item_id". |
| public setId( string $id ) : void |
Sets the item ID. |
| public getLabel( ) : string |
Returns the menu item label (already translated if translation is being done). |
| public setLabel( string $label ) : void |
Sets the menu item label. |
| public getIcon( ) : string |
Returns the name of the menu item icon. |
| public setIcon( string $icon ) : void |
Sets the menu item icon. |
| public getIndex( ) : int |
Returns the index - the order / priority of the menu item. |
| public setIndex( int $index ) : void |
Sets the index - the order / priority of the menu item. |
| public getSeparatorBefore( ) : bool |
Indicates whether the graphic item should be preceded by a separator. |
| public setSeparatorBefore( bool $separator_before ) : void |
Sets whether the graphic item should be preceded by a separator. |
| public getSeparatorAfter( ) : bool |
Indicates whether the graphic item should be followed by a separator. |
| public setSeparatorAfter( bool $separator_after ) : void |
Sets whether the graphic item should be followed by a separator. |
| public getPageId( ) : string |
Returns the ID of the page if the entry points to a MVC page. |
| public setPageId( string $page_id ) : void |
Sets the ID of the page if the entry points to a MVC page. |
| public getBaseId( ) : string |
Returns the ID of the base if the entry points to a MVC page. |
| public setBaseId( string $base_id ) : void |
Sets the ID of the base if the entry points to a MVC page. |
| public getLocale( ) : ?Locale |
Returns location if the entry points to a MVC page. |
| public setLocale( Locale $locale ) : void |
Sets the location if the entry points to a MVC page. |
| public getGetParams( ) : array |
Returns optional GET parameters if the item points to a MVC page. |
| public setGetParams( array $get_params ) : void |
Sets optional GET parameters if the item points to a MVC page. |
| public getUrlParts( ) : array |
Returns optional parts of the URL path if the entry points to a MVC page. |
| public setUrlParts( array $url_parts ) : void |
Sets optional parts of the URL path if the entry points to a MVC page. |
| public setURL( string $URL ) : void |
Sets the direct URL to which the item points. |
| public getTargetPage( ) : MVC_Page_Interface|null |
If the entry points to a MVC page, then it returns an instance of the target page. |
| public getUrl( ) : string |
Returns the URL to which the item points. Either a direct URL, or it will generate it based on the set parameters MVC page. |
| public getAccessAllowed( ) : bool |
Verifies that the menu item is accessible to the current user in terms of authentication and authorization. |
| public getSourceModuleName( ): string |
Returns the name of the application module that defined the menu item. |
| public setSourceModuleName( string $source_module_name ): string |
Sets the name of the application module that defined the menu item. |