AdminMenu
in package
Administration menu
Tags
Table of Contents
Properties
- $db : SQL
- $list : array<int, array<string, mixed>>|null
- $nav : AdminNavigation
- $sections : Sections|null
- $tree : array<int, array<string|int, int>>
- $user : UserSession
Methods
- __construct() : mixed
- render() : void
- Prints menu
- isVisible() : bool
- Is item visible in menu
- load() : void
- Load items from menu
- parseCustomLeaf() : array<string|int, array<string, string>>
- Add custom items into menu
- renderBranch() : void
- Print item in menu
Properties
$db
protected
SQL
$db
$list
protected
array<int, array<string, mixed>>|null
$list
= null
$nav
protected
AdminNavigation
$nav
$sections
protected
Sections|null
$sections
$tree
protected
array<int, array<string|int, int>>
$tree
= []
$user
protected
UserSession
$user
Methods
__construct()
public
__construct(SQL $db, AdminNavigation $nav, UserSession $user[, Sections|null $sections = null ]) : mixed
Parameters
- $db : SQL
- $nav : AdminNavigation
- $user : UserSession
- $sections : Sections|null = null
render()
Prints menu
public
render() : void
isVisible()
Is item visible in menu
protected
isVisible(int $id[, bool $root = true ]) : bool
Parameters
- $id : int
- $root : bool = true
Return values
boolload()
Load items from menu
protected
load() : void
parseCustomLeaf()
Add custom items into menu
protected
parseCustomLeaf(string $file, array<string, mixed> $custom) : array<string|int, array<string, string>>
Parameters
- $file : string
- $custom : array<string, mixed>
Return values
array<string|int, array<string, string>>renderBranch()
Print item in menu
protected
renderBranch(int $id) : void
Parameters
- $id : int