Interface luya\cms\menu\InjectItemInterface
Implemented by | luya\cms\menu\InjectItem |
---|---|
Available since version | 1.0.0 |
Source Code | https://github.com/luyadev/luya-module-cms/blob/master/src/menu/InjectItemInterface.php |
An Injector Item Interface.
When you like to inject items into the menu while running the application each object must implement this InjectItemInterface.
In order to see an example of how to use the injection of items read the [[app-menu.md]] Guide in the injectors section.
Public Methods
Method | Description | Defined By |
---|---|---|
getId() | Getter method for the unqiue id of a language item which can be auto generated or directly from the injection item. Ensure the unique identifier when setting this property. | luya\cms\menu\InjectItemInterface |
getLang() | Getter method for the language on which the item is injected. The language is the short code based from the composition component. | luya\cms\menu\InjectItemInterface |
toArray() | This method provides all setter variables for the item. | luya\cms\menu\InjectItemInterface |
Method Details
Getter method for the unqiue id of a language item which can be auto generated or directly from the injection item. Ensure the unique identifier when setting this property.
public abstract integer|string getId ( ) | ||
return | integer|string |
The unique identifier can be either a string or a number, or a concat of both. |
---|
public function getId();
Getter method for the language on which the item is injected. The language is the short code based from the composition component.
public abstract string getLang ( ) | ||
return | string |
A language short code string (like de, en) |
---|
public function getLang();