Documentation

MenuManager
in package

Class MenuManager

Tags
subpackage

Models

Table of Contents

OPTION_CURRENTS  = 'currents'
OPTION_ICON  = 'icon'
$database  : Context
$external_rules  : mixed
$groups  : mixed
$items  : mixed
__construct()  : mixed
addExternalRule()  : mixed
Добавляет внешние правило
registerGroup()  : mixed
Регистрирует новые группы меню
registerItem()  : bool
Register menu item Регистрирует пункт меню Options: icon
tree()  : mixed
Строит древовидную структуру пунктов меню
sort()  : mixed
Сортирыет пункты меню в алфавитном порядке

Constants

OPTION_CURRENTS

public string OPTION_CURRENTS = 'currents'

Properties

Methods

__construct()

public __construct(Context $database) : mixed
Parameters
$database : Context
Return values
mixed

addExternalRule()

Добавляет внешние правило

public addExternalRule(string $rule, string $link) : mixed
Parameters
$rule : string

правило

$link : string

ссылка

Return values
mixed

registerGroup()

Регистрирует новые группы меню

public registerGroup(string $code, string $title[, int $order = 10 ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$code : string

Идентификатор шруппы понктов меню

$title : string

название группы пунктов меню

$order : int = 10

порядок отображения

$options : array<string|int, mixed> = []

Настройки пункта меню

Tags
throws
MenuGroupExistException
Return values
mixed

registerItem()

Register menu item Регистрирует пункт меню Options: icon

public registerItem(string $title, string $url, array<string|int, mixed>|string $highlighting_urls[, string|null $group_code = null ][, int $order = 10 ][, array<string|int, mixed> $options = [] ][, array<string|int, mixed> $params = [] ]) : bool
Parameters
$title : string

Заголовок пункта меню

$url : string

Ссылка для переходя при нажатии по пункту меню

$highlighting_urls : array<string|int, mixed>|string
$group_code : string|null = null

Док группы

$order : int = 10

Порядок отображения пунктов меню

$options : array<string|int, mixed> = []

Массив настроек пункта меню

$params : array<string|int, mixed> = []

массив параметров

Return values
bool

Is success

tree()

Строит древовидную структуру пунктов меню

public tree() : mixed
Return values
mixed

sort()

Сортирыет пункты меню в алфавитном порядке

private static sort(array<string|int, mixed> &$data) : mixed
Parameters
$data : array<string|int, mixed>

массив для сортироваки

Return values
mixed

Search results