Method |
Description |
|
__call ( string $method, array $args ) : Item | boolean |
Dynamic search method against a menu attribute. |
|
__construct ( string $name, array $config, HtmlBuilder $html, UrlGenerator $url ) |
Create a new Builder instance. |
|
__get ( string $property ) : Item |
Returns menu item by name. |
|
active ( ) : Caffeinated\Menus\Collection |
Fetches and returns all active state menu items. |
|
add ( string $title, array | string $options = '' ) : Item |
Add an item to the defined menu. |
|
all ( ) : Caffeinated\Menus\Collection |
Fetches and returns all menu items. |
|
asUl ( array $attributes = [] ) : string |
Renders the menu as an unordered list. |
|
attributes ( array $attributes = [] ) : string |
Converts the defined attributes into HTML. |
|
config ( string $key ) : string |
Return the configuration value by key. |
|
dispatch ( array $options ) : string |
Get the action type from the options. |
|
divide ( array $attributes = [] ) : void |
Insert a divider after the item. |
|
extractAttributes ( array $options = [] ) : array |
Extract the valid attributes from the passed options. |
|
filter ( callable $callback ) : Builder |
Filter menu items through a callback. |
|
filterRecursively ( string $attribute, mixed $value ) : Caffeinated\Menus\Collection |
Filter menu items recursively. |
|
find ( integer $id ) : Item |
Fetches and returns a menu item by it's ID. |
|
first ( ) : Item |
Fetches and returns the first menu item. |
|
formatGroupClass ( $new, $old ) : mixed |
Format the groups class. |
|
get ( string $slug ) : Item |
Fetches and returns a menu item by it's slug. |
|
getLastGroupPrefix ( ) : mixed |
Get the prefix from the last group of the stack. |
|
guard ( ) : Builder |
Filter menu items based on Shinobi permissions. |
|
isAbsolute ( string $url ) : boolean |
Determines if the given URL is absolute. |
|
item ( string $slug ) : Item |
Facade method for the get() method. |
|
last ( ) : Item |
Fetches and returns the last menu item. |
|
roots ( ) : Caffeinated\Menus\Collection |
Returns all items with no parents. |
|
sortBy ( string $key ) : Builder |
Sorts the menu based on key given in ascending order. |
|
sortByDesc ( string $key ) : Builder |
Sorts the menu based on key given in descending order. |
|