Documentation

AdminTrait

Administration pages Trait

Table of Contents

Properties

$action_buttons  : array<string|int, mixed>

Methods

addActionButton()  : self
adds an action button
addActionLink()  : self
adds an action link
checkPermission()  : bool
checks if current user has permission
getRouteGroup()  : string|null
gets route group
isCrud()  : bool
isWeb()  : bool
removeAction()  : self
removes an action link / button
checkCredentials()  : bool
checks user credentials
renderActionButtons()  : string
renders action buttons

Properties

$action_buttons

protected array<string|int, mixed> $action_buttons = []

action_buttons

Methods

addActionButton()

adds an action button

public addActionButton(string $key, string $button_id, string $button_text[, string $button_class = 'btn btn-sm btn-light' ]) : self
Parameters
$key : string
$button_id : string
$button_text : string
$button_class : string = 'btn btn-sm btn-light'
Return values
self

adds an action link

public addActionLink(mixed $key, mixed $link_id, mixed $link_text[, string $link_href = '#' ][, string $link_class = 'btn btn-sm btn-light' ][, array<string|int, mixed> $attributes = [] ]) : self
Parameters
$key : mixed
$link_id : mixed
$link_text : mixed
$link_href : string = '#'
$link_class : string = 'btn btn-sm btn-light'
$attributes : array<string|int, mixed> = []
Return values
self

checkPermission()

checks if current user has permission

public checkPermission(string $permission_name) : bool
Parameters
$permission_name : string
Tags
throws
BasicException
Return values
bool

getRouteGroup()

gets route group

public static getRouteGroup() : string|null
Return values
string|null

removeAction()

removes an action link / button

public removeAction(mixed $key) : self
Parameters
$key : mixed
Return values
self

checkCredentials()

checks user credentials

protected checkCredentials() : bool
Tags
throws
BasicException
Return values
bool

renderActionButtons()

renders action buttons

protected renderActionButtons() : string
Tags
throws
DependencyException
throws
NotFoundException
Return values
string
Loading…
On this page

Search results