\App\Base\TraitsAdminTrait

Administration pages Trait

Summary

Methods
Properties
Constants
getRouteGroup()
checkPermission()
addActionLink()
No public properties found
No constants found
checkCredentials()
renderActionButtons()
addActionButton()
$current_user_model
$action_buttons
N/A
No private methods found
No private properties found
N/A

Properties

$current_user_model

$current_user_model : \App\Site\Models\User

Type

User — current user model

$action_buttons

$action_buttons : array

Type

array — action_buttons

Methods

getRouteGroup()

getRouteGroup() : string

gets route group

Returns

string —

checkPermission()

checkPermission(string  $permission_name) : bool

checks if current user has permission

Parameters

string $permission_name

Throws

\Degami\Basics\Exceptions\BasicException

Returns

bool —

addActionLink()

addActionLink( $key,  $link_id,  $link_text, string  $link_href = '#', string  $link_class = 'btn btn-sm btn-light', array  $attributes = []) : self

adds an action link

Parameters

$key
$link_id
$link_text
string $link_href
string $link_class
array $attributes

Returns

self —

checkCredentials()

checkCredentials() : bool

checks user credentials

Throws

\Degami\Basics\Exceptions\BasicException

Returns

bool —

renderActionButtons()

renderActionButtons() : string

renders action buttons

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

string —

addActionButton()

addActionButton(string  $key, string  $button_id, string  $button_text, string  $button_class = 'btn btn-sm btn-light') : self

adds an action button

Parameters

string $key
string $button_id
string $button_text
string $button_class

Returns

self —