API Documentation
Table of Contents
Namespaces
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.
- __() : string
- Translates a string.
- d__() : string
- Translates a string.
- dn__() : string
- Plural version of gettext.
- dnp__() : string
- Plural version of pgettext.
- p__() : string
- Translate with context.
- dp__() : string
- Translate with context.
- n__() : string
- Plural version of gettext.
- np__() : string
- Plural version of pgettext.
- esc__() : string
- Get translation text from `__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- esc_d__() : string
- Get translation text from `d__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- esc_dn__() : string
- Get translation text from `dn__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- esc_dnp__() : string
- Get translation text from `dnp__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- esc_dp__() : string
- Get translation text from `dp__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- esc_n__() : string
- Get translation text from `n__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- esc_np__() : string
- Get translation text from `np__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- esc_p__() : string
- Get translation text from `p__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
- noop__() : string
- Noop, marks the string for translation but returns it unchanged.
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
Tags
Return values
string__()
Translates a string.
__(string $msgid) : string
Parameters
- $msgid : string
-
String to be translated
Return values
string —translated string (or original, if not found)
d__()
Translates a string.
d__(string $domain, string $msgid) : string
Parameters
- $domain : string
-
Domain to use
- $msgid : string
-
String to be translated
Return values
string —translated string (or original, if not found)
dn__()
Plural version of gettext.
dn__(string $domain, string $msgid, string $msgidPlural, int $number) : string
Parameters
- $domain : string
-
Domain to use
- $msgid : string
-
Single form
- $msgidPlural : string
-
Plural form
- $number : int
-
Number of objects
Return values
string —translated plural form
dnp__()
Plural version of pgettext.
dnp__(string $domain, string $msgctxt, string $msgid, string $msgidPlural, int $number) : string
Parameters
- $domain : string
-
Domain to use
- $msgctxt : string
-
Context
- $msgid : string
-
Single form
- $msgidPlural : string
-
Plural form
- $number : int
-
Number of objects
Return values
string —translated plural form
p__()
Translate with context.
p__(string $msgctxt, string $msgid) : string
Parameters
- $msgctxt : string
-
Context
- $msgid : string
-
String to be translated
Return values
string —translated plural form
dp__()
Translate with context.
dp__(string $domain, string $msgctxt, string $msgid) : string
Parameters
- $domain : string
-
Domain to use
- $msgctxt : string
-
Context
- $msgid : string
-
String to be translated
Return values
string —translated plural form
n__()
Plural version of gettext.
n__(string $msgid, string $msgidPlural, int $number) : string
Parameters
- $msgid : string
-
Single form
- $msgidPlural : string
-
Plural form
- $number : int
-
Number of objects
Return values
string —translated plural form
np__()
Plural version of pgettext.
np__(string $msgctxt, string $msgid, string $msgidPlural, int $number) : string
Parameters
- $msgctxt : string
-
Context
- $msgid : string
-
Single form
- $msgidPlural : string
-
Plural form
- $number : int
-
Number of objects
Return values
string —translated plural form
esc__()
Get translation text from `__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc__(string $original) : string
Parameters
- $original : string
-
The message to translate.
Return values
string —Return translated text with escaped html.
esc_d__()
Get translation text from `d__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc_d__(string $domain, string $original) : string
Parameters
- $domain : string
-
The text domain.
- $original : string
-
The message to translate.
Return values
string —Return translated text with escaped html.
esc_dn__()
Get translation text from `dn__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc_dn__(string $domain, string $original, string $plural, float|int|string $value) : string
Parameters
- $domain : string
-
The text domain.
- $original : string
-
The singular message.
- $plural : string
-
The plural message.
- $value : float|int|string
-
The number (e.g. item count) to determine the translation for the respective grammatical number.
Return values
string —Return translated text with escaped html.
esc_dnp__()
Get translation text from `dnp__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc_dnp__(string $domain, string $context, string $original, string $plural, float|int|string $value) : string
Parameters
- $domain : string
-
The text domain.
- $context : string
-
The context message to describe what is this message about.
- $original : string
-
The singular message.
- $plural : string
-
The plural message.
- $value : float|int|string
-
The number (e.g. item count) to determine the translation for the respective grammatical number.
Return values
string —Return translated text with escaped html.
esc_dp__()
Get translation text from `dp__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc_dp__(string $domain, string $context, string $original) : string
Parameters
- $domain : string
-
The text domain.
- $context : string
-
The context message to describe what is this message about.
- $original : string
-
The singular message.
Return values
string —Return translated text with escaped html.
esc_n__()
Get translation text from `n__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc_n__(string $original, string $plural, float|int|string $value) : string
Parameters
- $original : string
-
The singular message.
- $plural : string
-
The plural message.
- $value : float|int|string
-
The number (e.g. item count) to determine the translation for the respective grammatical number.
Return values
string —Return translated text with escaped html.
esc_np__()
Get translation text from `np__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc_np__(string $context, string $original, string $plural, float|int|string $value) : string
Parameters
- $context : string
-
The context message to describe what is this message about.
- $original : string
-
The singular message.
- $plural : string
-
The plural message.
- $value : float|int|string
-
The number (e.g. item count) to determine the translation for the respective grammatical number.
Return values
string —Return translated text with escaped html.
esc_p__()
Get translation text from `p__()` function and then escape using `htmlspecialchars()` with `ENT_QUOTES` flag.
esc_p__(string $context, string $original) : string
Parameters
- $context : string
-
The context message to describe what is this message about.
- $original : string
-
The singular message.
Return values
string —Return translated text with escaped html.
noop__()
Noop, marks the string for translation but returns it unchanged.
noop__(string $original) : string
Parameters
- $original : string