Jet\Navigation_MenuSet
Presents a set of menus.
Overview of methods
Method | Meaning of |
---|---|
public static get( string $name, string|null|bool $translator_dictionary=null ) : Navigation_MenuSet |
Returns an instance of menu set based on the name (parameter $name). The $translator_dictionary parameter specifies which dictionary will be used to translate menu and menu item labels. If null, then the currently valid dictionary is used. If the value is false, then no translation is performed. |
public static exists( string $name ) : bool |
Verifies whether the given menu set exists. |
public static getList( ) : iterable |
Returns a list of existing menu sets. Designed for tools like Jet Studio. |
public __construct( string $name, string|null|bool $translator_dictionary=null ) |
Parameters:
|
public setName( string $name ) : void |
Sets the name of the menu set. |
public getName( ) : string |
Returns the name of the menu set. |
public addMenu( string $id, string $label, string $icon='', int|null $index=null ) : Navigation_Menu |
Adds a menu to the menu set and returns its newly created instance. |
public getMenu( string $id ) : Navigation_Menu|null |
Returns a specific menu from the set based on the ID. If the menu does not exist, then it returns null. |
public getMenus( ) : Navigation_Menu[] |
Returns all menus from the set. |
public saveDataFile( ) : void |
Saves the set definition. |