PHP Класс App\services\Hook

Показать файл Открыть проект

Открытые методы

Метод Описание
addMenuItem ( string $category, integer $position, array $menu ) : void Add an item to menu.
addRoute ( Closure $callback ) Add a route. A router instance will be passed to the given callback.

Описание методов

addMenuItem() публичный статический метод

Add an item to menu.
public static addMenuItem ( string $category, integer $position, array $menu ) : void
$category string 'user' or 'admin'
$position integer Where to insert the given item, start from 0.
$menu array e.g. [ 'title' => 'Title', # will be translated by translator 'link' => 'user/config', # route link 'icon' => 'fa-book' # font-awesome icon ]
Результат void

addRoute() публичный статический метод

Add a route. A router instance will be passed to the given callback.
public static addRoute ( Closure $callback )
$callback Closure