Метод |
Описание |
|
__call ( string $method, array $args ) : Lavary\Menu\Item |
Search the menu based on an attribute |
|
__construct ( $name, $conf ) : void |
Initializing the menu manager |
|
__get ( $prop ) : Lavary\Menu\Item |
Returns menu item by name |
|
add ( string $title, $options = '' ) : Lavary\Menu\Item |
Adds an item to the menu |
|
all ( ) : array |
Return all items in the collection |
|
asDiv ( $attributes = [], $childrenAttributes = [] ) : string |
Returns the menu as div containers |
|
asOl ( $attributes = [], $childrenAttributes = [] ) : string |
Returns the menu as an ordered list. |
|
asUl ( $attributes = [], $childrenAttributes = [] ) : string |
Returns the menu as an unordered list. |
|
attributes ( array $attributes ) : string |
Build an HTML attribute string from an array. |
|
conf ( string $key ) : string |
Return configuration value by key |
|
dispatch ( $options ) : string |
Get the form action from the options. |
|
divide ( array $attributes = [] ) : void |
Insert a separator after the item |
|
extractAttributes ( array $options = [] ) : array |
Get the valid attributes from the options. |
|
filter ( callable $callback ) : Lavary\Menu\Builder |
Filter menu items by user callbacks |
|
filterRecursive ( string $attribute, mixed $value ) : Lavary\Menu\Collection |
Filter items recursively |
|
find ( $id ) : Lavary\Menu\Item |
Returns menu item by Id |
|
first ( ) : Lavary\Menu\Item |
Return the first item in the collection |
|
formatGroupClass ( $new, $old ) : string |
Get the valid attributes from the options. |
|
formatGroupPrefix ( array $new, array $old ) : string |
Format the prefix for the new group attributes. |
|
get ( $title ) : Lavary\Menu\Item |
Returns menu item by name |
|
getLastGroupPrefix ( ) : string |
Get the prefix from the last group on the stack. |
|
group ( array $attributes, callable $closure ) : void |
Create a menu group with shared attributes. |
|
isAbs ( string $url ) : boolean |
Check if the given url is an absolute url. |
|
item ( $title ) : Lavary\Menu\Item |
Returns menu item by name |
|
last ( ) : Lavary\Menu\Item |
Return the last item in the collection |
|
mergeStatic ( $new = null, array $old = [] ) : string |
Merge item's attributes with a static string of attributes |
|
raw ( $title, array $options = [] ) : Lavary\Menu\Item |
Add raw content |
|
render ( string $type = 'ul', integer $parent = null, $childrenAttributes = [] ) : string |
Generate the menu items as list items using a recursive function |
|
roots ( ) : Collection |
Returns items with no parent |
|
sortBy ( $sort_by, string | callable $sort_type = 'asc' ) : Lavary\Menu\Builder |
Sorts the menu based on user's callable |
|