Метод |
Описание |
|
__construct ( Menu $builder, $id, string $title, $options ) : void |
Creates a new Lavary\Menu\MenuItem instance. |
|
__get ( $prop ) : string |
Search in meta data if a property doesn't exist otherwise return the property |
|
activate ( Item $item = null ) |
Activat the item |
|
active ( $pattern = null ) : Lavary\Menu\Item |
Make the item active |
|
add ( string $title, string | array $options = '' ) : void |
Creates a sub Item |
|
all ( ) : Lavary\Menu\Collection |
Returns all childeren of the item |
|
append ( $html ) : Lavary\Menu\Item |
Appends text or html to the item |
|
attr ( ) : string | Lavary\Menu\Item |
Add attributes to the item |
|
cascade_data ( array $args = [] ) |
Cascade data to children |
|
checkActivationStatus ( ) |
Decide if the item should be active |
|
children ( ) : Lavary\Menu\Collection |
Returns childeren of the item |
|
data ( ) : string | Lavary\Menu\Item |
Set or get items's meta data |
|
divide ( array $attributes = [] ) : void |
Insert a seprator after the item |
|
group ( array $attributes, callable $closure ) : void |
Group children of the item |
|
hasChildren ( ) : boolean |
Checks if the item has any children |
|
hasProperty ( String $property ) : boolean |
Check if propery exists either in the class or the meta collection |
|
id ( mixed $id = null ) : /Lavary/Menu/Item |
Set id for the item manually |
|
nickname ( string $nickname = null ) : /Lavary/Menu/Item |
Set nickname for the item manually |
|
prepend ( $html ) : Lavary\Menu\Item |
Prepends text or html to the item |
|
raw ( $title, array $options = [] ) : Lavary\Menu\Item |
Add a plain text item |
|
url ( ) : string |
Generate URL for link |
|