Property | Type | Description | |
---|---|---|---|
$patterns | array | Array of patterns to match the active state |
Method | Description | |
---|---|---|
__construct ( |
Create a new item instance | |
getContent ( ) : Menu\Traits\Content | Get the Item's content | |
getElement ( ) : string | Get the Item's element | |
getRequest ( ) : Request | Get the Request instance | |
hasActiveChild ( ) : boolean | Check if this item has an active child | |
hasChildren ( ) | ||
isActive ( ) : boolean | Check if this item is active | |
render ( $depth ) : string | Render the item | |
setActivePatterns ( string | array $pattern, string $name = null ) | Add an pattern to $patterns array | |
setAfterContent ( string $value ) | Set the value to be inserted after the item's content | |
setBeforeContent ( string $value ) | Set the value to be inserted before the item's content | |
setElement ( string $element = null ) | Set the Item's element | |
stop ( ) : |
Break off a chain |
Method | Description | |
---|---|---|
getUrl ( ) : string | Get the url of the Item's content | |
hasActivePatterns ( ) : boolean | Check if this item has an active pattern |
Method | Description | |
---|---|---|
addActiveClasses ( ) | Add the various active classes to an array of attributes |
public __construct ( |
||
$parent | The parent | |
$value | The content | |
$children | array | Facultative children ItemLists |
$element | array | The Item element |
$beforeContent | string | String to add before the content |
$afterContent | string | String to add after the content |
public getContent ( ) : Menu\Traits\Content | ||
return | Menu\Traits\Content |
public hasActiveChild ( ) : boolean | ||
return | boolean |
protected hasActivePatterns ( ) : boolean | ||
return | boolean |
public setAfterContent ( string $value ) | ||
$value | string | The value to insert |
public setBeforeContent ( string $value ) | ||
$value | string | The value to insert |
public setElement ( string $element = null ) | ||
$element | string |
protected array $patterns | ||
return | array |