Phpxforms documentation

AdminModule
in package

AbstractYes

Administration - support functions for administration

Tags
author

DaVee

version
0.87dev
license

Lesser General Public License 2.1 or later; see http://www.gnu.org/licenses/lgpl-2.1.html

Table of Contents

Properties

$action  : string|null
$body  : string|null
$draw  : array<string, int>
$header  : string
$messages  : array<string, string>
$db  : SQL
$errors  : array<string|int, string>
$fileApi  : FileApi
$infos  : array<string|int, string>
$log  : Logger|null
$nav  : AdminNavigation
$redirectUrl  : string|null
$user  : UserSession

Methods

__construct()  : mixed
compile()  : void
Print module content
getCss()  : array<string, mixed>
Get css for module
getData()  : array<string, mixed>|null
Get specific data for ajax requests
getErrors()  : array<string|int, string>
Returns list of error type messages
getInfos()  : array<string|int, string>
Returns list of information type messages
getPageHeader()  : string
Default header for administration
getRedirectUrl()  : string|null
getScripts()  : array<string, mixed>
Get javascript
getTitle()  : string
Page title
initOutside()  : mixed
Start Control for outside usage (testing)
getMessage()  : string
Return readable text of error message
haveRights()  : bool
Check if active user has rights to the selected action
log()  : void
Log action
parseUrl()  : void
Parse parameters from split url

Properties

$draw

public array<string, int> $draw = ['body' => 1, 'head' => 1, 'alert' => 1, 'menu' => 1]

$messages

public array<string, string> $messages = ['Record created' => 'Záznam vytvořen', 'Changes saved' => 'Změny uloženy', 'Non-existent record' => 'Neexistující záznam', 'No record selected' => 'Nebyl vybrán žádný záznam', 'Invalid action' => 'Nepovolená akce', 'Unknown action' => 'Neznámá akce', 'No rights to section' => 'K této sekci nemáte přístup', 'No access to record' => 'K tomuto záznamu nemáte přístup', 'No rights to action' => 'K této akci nemáte dostatečná práva']

$errors

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

$infos

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

$redirectUrl

protected string|null $redirectUrl = null

Methods

compile()

Print module content

public abstract compile() : void

getCss()

Get css for module

public getCss() : array<string, mixed>
Return values
array<string, mixed>

getData()

Get specific data for ajax requests

public getData() : array<string, mixed>|null
Return values
array<string, mixed>|null

getErrors()

Returns list of error type messages

public getErrors() : array<string|int, string>
Return values
array<string|int, string>

getInfos()

Returns list of information type messages

public getInfos() : array<string|int, string>
Return values
array<string|int, string>

getPageHeader()

Default header for administration

public getPageHeader(string $name[, array<string|int, array<string, string>>|null $actions = null ][, string $extra = '' ]) : string
Parameters
$name : string
$actions : array<string|int, array<string, string>>|null = null
$extra : string = ''
Return values
string

getRedirectUrl()

public getRedirectUrl() : string|null
Return values
string|null

getScripts()

Get javascript

public getScripts() : array<string, mixed>
Return values
array<string, mixed>

getTitle()

Page title

public getTitle([string $space = ' - ' ]) : string
Parameters
$space : string = ' - '
Return values
string

initOutside()

Start Control for outside usage (testing)

public initOutside([bool $formMode = true ]) : mixed
Parameters
$formMode : bool = true

Start in edit mode

getMessage()

Return readable text of error message

protected getMessage(string $message[, string|null $insert = null ]) : string
Parameters
$message : string
$insert : string|null = null
Return values
string

haveRights()

Check if active user has rights to the selected action

protected haveRights(string $action[, bool $exception = false ]) : bool
Parameters
$action : string
$exception : bool = false
Tags
throws
OptionalException
Return values
bool

log()

Log action

protected log(string|null $action[, string|null $add = null ][, string|null $detail = null ]) : void
Parameters
$action : string|null
$add : string|null = null
$detail : string|null = null

parseUrl()

Parse parameters from split url

protected parseUrl(array<string|int, string> $param) : void
Parameters
$param : array<string|int, string>

        
On this page

Search results