HTMLFunctions.php
HTML functions.
To use these functions, you must include/require it.
Tags
Table of Contents
Functions
- rdbaGetDatetime() : string
- Get date/time value from UTC date/time to specific time zone.
- renderAlertHtml() : string
- Render RDTA alert box.
- renderBreadcrumbHtml() : string
- Render breadcrumb list without `<ul>` and `</ul>` due to it is already in **mainLayout_v.php** file.
- renderFaviconHtml() : string
- Render favicon HTML.
Functions
rdbaGetDatetime()
Get date/time value from UTC date/time to specific time zone.
rdbaGetDatetime(string $gmtDatetime[, string $timezone = '' ][, string $format = '%e %B %Y %H:%M:%S %z' ]) : string
Parameters
- $gmtDatetime : string
-
The GMT or UTC date/time.
- $timezone : string = ''
-
PHP time zone value.
- $format : string = '%e %B %Y %H:%M:%S %z'
-
Date/time format for use in
strftime()
.
Return values
string —Return formatted date/time to specific time zone.
renderAlertHtml()
Render RDTA alert box.
renderAlertHtml(string|array<string|int, mixed> $content[, string $alertClass = '' ][, bool $dismissable = true ]) : string
Parameters
- $content : string|array<string|int, mixed>
-
The alert content.
- $alertClass : string = ''
-
RDTA alert class. Accept 'success', 'error', 'info' anything else will be 'alert-warning'.
- $dismissable : bool = true
-
Set to
true
to make it dismissable,false
to unable to dismiss.
Return values
string —Return rendered RDTA alert element.
renderBreadcrumbHtml()
Render breadcrumb list without `<ul>` and `</ul>` due to it is already in **mainLayout_v.php** file.
renderBreadcrumbHtml(array<string|int, mixed> $breadcrumb) : string
Parameters
- $breadcrumb : array<string|int, mixed>
-
The breadcrumb array. The keys are:
item
Text of each link.
link
Link of each breadcrumb.
Return values
stringrenderFaviconHtml()
Render favicon HTML.
renderFaviconHtml(Container $Container, string $faviconPath) : string
Parameters
- $Container : Container
- $faviconPath : string