Phpxforms documentation

MediaDbBrowser extends Body
in package

Abstract core for html body with css and js functions

Table of Contents

Properties

$body  : string|null
$page  : int
$pager  : string
$perList  : int
$browserOnly  : bool
$cols  : array<string, string>
$css  : array<string, mixed>
$displayMode  : string
$dynamicTag  : string|null
$filter  : string
$filterMode  : array<string|int, string>|null
$filters  : array<string, array<string, string>>
$filterTags  : array<int, bool>
$hidePreviews  : bool
$mediaDb  : MediaDb
$multiSelect  : bool
$nav  : AdminNavigation
$rights  : array<string, bool>
$scripts  : array<string, mixed>
$search  : string|null
$sizeId  : int
$tabOrder  : array<string, string>
$title  : string

Methods

__construct()  : mixed
addCss()  : void
Add CSS
addScript()  : void
Add javascript
getAlert()  : string
Get bootstrap like alert
getBtnMore()  : string
getCSS()  : array<string, mixed>
Get CSS
getItems()  : string
getScript()  : array<string, mixed>
Get javascript
renderActionBar()  : void
renderContent()  : void
getColOrdering()  : string
getFunctions()  : string
getIcon()  : string
getLinkEdit()  : string
getPreview()  : string
getSearchParams()  : array<string, string>
getSrc()  : string
getTitle()  : string
Get page title
loadParams()  : void
renderDropbox()  : void

Properties

$cols

protected array<string, string> $cols = ['file' => 'Název', 'size' => 'Velikost', 'resolution' => 'Rozměry', 'created' => 'Datum']

$css

protected array<string, mixed> $css = []

$dynamicTag

protected string|null $dynamicTag = null

$filterMode

protected array<string|int, string>|null $filterMode = null

$filters

protected array<string, array<string, string>> $filters = ['' => ['NAME' => 'Vše'], 'docs' => ['NAME' => 'Dokumenty', 'MIME' => '(^text)|(doc)|(xsl)|(ods)|(odt)|(pdf)'], 'image' => ['NAME' => 'Obrázky', 'MIME' => '^image'], 'video' => ['NAME' => 'Video soubory', 'MIME' => '^video'], 'audio' => ['NAME' => 'Zvukové soubory', 'MIME' => '^audio']]

$scripts

protected array<string, mixed> $scripts = []

$title

protected string $title = ''

Methods

__construct()

public __construct(AdminNavigation $nav, MediaDb $mediaDb, array<string, bool> $rights[, bool $browserOnly = false ][, bool $multiSelect = false ][, int $sizeId = 0 ]) : mixed
Parameters
$nav : AdminNavigation
$mediaDb : MediaDb
$rights : array<string, bool>
$browserOnly : bool = false
$multiSelect : bool = false
$sizeId : int = 0

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

getAlert()

Get bootstrap like alert

public static getAlert(string $text[, string $type = 'danger' ]) : string
Parameters
$text : string
$type : string = 'danger'

alert type

Return values
string

getCSS()

Get CSS

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

getItems()

public getItems([bool $ajax = false ]) : string
Parameters
$ajax : bool = false
Return values
string

getScript()

Get javascript

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

getColOrdering()

protected getColOrdering(string $column) : string
Parameters
$column : string
Return values
string

getFunctions()

protected getFunctions(int $id) : string
Parameters
$id : int
Return values
string

getIcon()

protected getIcon(array<string, mixed> $file) : string
Parameters
$file : array<string, mixed>
Return values
string

getLinkEdit()

protected getLinkEdit(int $id) : string
Parameters
$id : int
Return values
string

getPreview()

protected getPreview(int $id, array<string, mixed> $file, int $sizeId, string|null $alt) : string
Parameters
$id : int
$file : array<string, mixed>
$sizeId : int
$alt : string|null
Return values
string

getSearchParams()

protected getSearchParams() : array<string, string>
Return values
array<string, string>

getSrc()

protected getSrc(int $id[, int $sizeId = 0 ][, bool $edit = false ]) : string
Parameters
$id : int
$sizeId : int = 0
$edit : bool = false
Return values
string

getTitle()

Get page title

protected getTitle([string $split = ' - ' ]) : string
Parameters
$split : string = ' - '
Return values
string

        
On this page

Search results