Interface luya\cms\menu\InjectItemInterface

Implemented byluya\cms\menu\InjectItem
Available since version1.0.0

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

Hide inherited 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

Hide inherited methods

getId() public abstract method

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();

            
getLang() public abstract method

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();

            
toArray() public abstract method

This method provides all setter variables for the item.

public abstract array toArray ( )
return array

An array where the key is the name of the setter property like title, alias etc.

                public function toArray();