AdminBodyModule
extends AdminBody
in package
Body for administration with AdminModule
Tags
Table of Contents
Properties
- $body : string|null
- $content : string|false|null
- $css : array<string, mixed>
- $data : array<string, string>|null
- $db : SQL
- $draw : array<string, int>
- $dynamicTag : string|null
- $errors : array<string|int, string>
- $fileApi : FileApi|null
- $infos : array<string|int, string>
- $log : Logger|null
- $menu : AdminMenu
- $modul : AdminModule|null
- $nav : AdminNavigation
- $scripts : array<string, mixed>
- $sections : Sections|null
- $title : string
- $user : UserSession
Methods
- __construct() : mixed
- addCss() : void
- Add CSS
- addScript() : void
- Add javascript
- compile() : void
- Show output
- getAlert() : string
- Get bootstrap like alert
- getCSS() : array<string, mixed>
- Get CSS
- getScript() : array<string, mixed>
- Get javascript
- checkLogin() : void
- User login and redirect on user homepage
- getFooter() : void
- Html body footer
- getHeader() : void
- Html body header
- getPageContent() : void
- Page content
- getPageFooter() : void
- Page footer
- getPageHeader() : void
- Page header
- getTitle() : string
- Get page title
- loadAlert() : string
- Load and escape error messages
- loadModule() : void
- Import selected module
- renderAjax() : void
- Display for ajax request
- renderErrors() : void
- Show error alerts
- renderHtml() : void
- Display for html request
- runModule() : void
- Execute module
Properties
$body
protected
string|null
$body
= null
$content
protected
string|false|null
$content
= null
$css
protected
array<string, mixed>
$css
= []
$data
protected
array<string, string>|null
$data
= null
$db
protected
SQL
$db
$draw
protected
array<string, int>
$draw
= ['body' => 1, 'head' => 1, 'alert' => 1, 'menu' => 1]
$dynamicTag
protected
string|null
$dynamicTag
= null
$errors
protected
array<string|int, string>
$errors
= []
$fileApi
protected
FileApi|null
$fileApi
$infos
protected
array<string|int, string>
$infos
= []
$log
protected
Logger|null
$log
$menu
protected
AdminMenu
$menu
$modul
protected
AdminModule|null
$modul
= null
$nav
protected
AdminNavigation
$nav
$scripts
protected
array<string, mixed>
$scripts
= []
$sections
protected
Sections|null
$sections
$title
protected
string
$title
= ''
$user
protected
UserSession
$user
Methods
__construct()
public
__construct(SQL $db, AdminNavigation $nav, UserSession $user[, Sections|null $sections = null ][, FileApi|null $fileApi = null ][, Logger|null $log = null ]) : mixed
Parameters
- $db : SQL
- $nav : AdminNavigation
- $user : UserSession
- $sections : Sections|null = null
- $fileApi : FileApi|null = null
- $log : Logger|null = null
addCss()
Add CSS
public
final addCss(string $type, string $value[, string $media = 'all' ]) : void
Parameters
- $type : string
-
FILE,CODE
- $value : string
-
depends on type
- $media : string = 'all'
-
css media type
addScript()
Add javascript
public
final addScript(string $type, array<string, mixed>|string|null $value) : void
Parameters
- $type : string
-
FILE,READY,GLOBAL,ARRAY
- $value : array<string, mixed>|string|null
-
depends on type
compile()
Show output
public
compile() : void
getAlert()
Get bootstrap like alert
public
static getAlert(string $text[, string $type = 'danger' ]) : string
Parameters
- $text : string
- $type : string = 'danger'
-
alert type
Return values
stringgetCSS()
Get CSS
public
final getCSS() : array<string, mixed>
Return values
array<string, mixed>getScript()
Get javascript
public
final getScript() : array<string, mixed>
Return values
array<string, mixed>checkLogin()
User login and redirect on user homepage
protected
checkLogin() : void
getFooter()
Html body footer
protected
getFooter() : void
getHeader()
Html body header
protected
getHeader() : void
getPageContent()
Page content
protected
getPageContent() : void
getPageFooter()
Page footer
protected
getPageFooter() : void
getPageHeader()
Page header
protected
getPageHeader() : void
getTitle()
Get page title
protected
getTitle([string $split = ' - ' ]) : string
Parameters
- $split : string = ' - '
Return values
stringloadAlert()
Load and escape error messages
protected
loadAlert(string $mark) : string
Parameters
- $mark : string
Return values
stringloadModule()
Import selected module
protected
loadModule() : void
renderAjax()
Display for ajax request
protected
renderAjax() : void
renderErrors()
Show error alerts
protected
renderErrors() : void
renderHtml()
Display for html request
protected
renderHtml() : void
runModule()
Execute module
protected
runModule() : void