HtmlComponent
extends Injectable
in package
Class HtmlComponent
Table of Contents
Properties
- $auth : AuthComponent
- $l : Logger
- $trans : Translator
- $automerge : mixed
Methods
- __construct() : mixed
- addAssets() : mixed
- base64File() : mixed
- calcTimeDiff() : mixed
- createUri() : string
- Create an uri string.
- getCurrentUri() : array<string|int, mixed>|string
- Get and parse current request uri.
- getMessage() : mixed
- getReferer() : mixed
- getTitle() : mixed
- getUriParts() : array<string|int, mixed>
- Get the given link parts for fw.
- isActive() : bool
- Check the given link is active.
- setLayout() : mixed
- add_one_asset() : mixed
- registerErrorTranslations() : mixed
Properties
$auth read-only
public
AuthComponent
$auth
$l read-only
public
Logger
$l
$trans read-only
public
Translator
$trans
$automerge
private
mixed
$automerge
= false
Methods
__construct()
public
__construct() : mixed
addAssets()
public
addAssets() : mixed
base64File()
public
base64File(mixed $filename) : mixed
Parameters
- $filename : mixed
calcTimeDiff()
public
calcTimeDiff(mixed $date) : mixed
Parameters
- $date : mixed
createUri()
Create an uri string.
public
createUri([string $route = null ][, string|array<string|int, mixed> $parameters = [] ][, array<string|int, mixed> $queryString = [] ]) : string
Parameters
- $route : string = null
-
Route string without trailing slashes. Optional.
- $parameters : string|array<string|int, mixed> = []
-
More uri parts.
String for one element, numerical array for more than one. Optional. - $queryString : array<string|int, mixed> = []
-
Query string after the route uri in associative array. Optional.
Return values
stringgetCurrentUri()
Get and parse current request uri.
public
getCurrentUri([bool $onlyRoute = false ]) : array<string|int, mixed>|string
Parameters
- $onlyRoute : bool = false
-
Get only route string
Return values
array<string|int, mixed>|stringgetMessage()
public
getMessage(mixed $name, Form $form) : mixed
Parameters
- $name : mixed
- $form : Form
getReferer()
public
getReferer(mixed $fallback[, mixed $skipPager = false ]) : mixed
Parameters
- $fallback : mixed
- $skipPager : mixed = false
getTitle()
public
getTitle() : mixed
getUriParts()
Get the given link parts for fw.
public
getUriParts(string $link) : array<string|int, mixed>
Parameters
- $link : string
-
Url/Uri string
Return values
array<string|int, mixed>isActive()
Check the given link is active.
public
isActive(string $link[, bool $onlyRoute = false ][, string $skipPager = false ]) : bool
Parameters
- $link : string
-
Comparable link string
- $onlyRoute : bool = false
-
Check only the route. Optional.
- $skipPager : string = false
-
Trim pager uri part with regexp. Optional.
Return values
boolsetLayout()
public
setLayout(mixed $layout) : mixed
Parameters
- $layout : mixed
add_one_asset()
private
add_one_asset(string $type, Collection $collection, string $path) : mixed
Parameters
- $type : string
- $collection : Collection
- $path : string
registerErrorTranslations()
private
registerErrorTranslations() : mixed