PHP Class Lavary\Menu\Menu

Afficher le fichier Open project: lavary/laravel-menu Class Usage Examples

Protected Properties

Свойство Type Description
$collection Illuminate\Support\Collection Menu collection
$menu Lavary\Menu\Menu List of menu items

Méthodes publiques

Méthode Description
__construct ( ) Initializing the menu builder
all ( ) : Collection Alias for getCollection
get ( string $key ) : Item Return Menu instance from the collection by key
getCollection ( ) : Collection Return Menu collection
loadConf ( string $name ) : array Loads and merges configuration data
make ( string $name, callable $callback ) : Menu Create a new menu instance

Method Details

__construct() public méthode

Initializing the menu builder
public __construct ( )

all() public méthode

Alias for getCollection
public all ( ) : Collection
Résultat Illuminate\Support\Collection

get() public méthode

Return Menu instance from the collection by key
public get ( string $key ) : Item
$key string
Résultat Item

getCollection() public méthode

Return Menu collection
public getCollection ( ) : Collection
Résultat Illuminate\Support\Collection

loadConf() public méthode

Loads and merges configuration data
public loadConf ( string $name ) : array
$name string
Résultat array

make() public méthode

Create a new menu instance
public make ( string $name, callable $callback ) : Menu
$name string
$callback callable
Résultat Menu

Property Details

$collection protected_oe property

Menu collection
protected Illuminate\Support\Collection $collection
Résultat Illuminate\Support\Collection

$menu protected_oe property

List of menu items
protected Lavary\Menu\Menu $menu
Résultat Lavary\Menu\Menu