title | footer |
---|---|
\leantime\core\template |
false |
- Full name:
\leantime\core\template
__construct - get instance of frontcontroller
public template::__construct(): mixed
Return Value:
assign - assign variables in the action for template
public template::assign( $name, $value): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
name |
**** | |
value |
**** |
Return Value:
setError - assign errors to the template
public template::setNotification( $msg, $type): string
Parameters:
Parameter | Type | Description |
---|---|---|
msg |
**** | |
type |
**** |
Return Value:
getTemplatePath - Find template in custom and src directories
public template::getTemplatePath(string $module, string $name): string|bool
Parameters:
Parameter | Type | Description |
---|---|---|
module |
string | Module template resides in |
name |
string | Template filename name (including tpl.php extension) |
Return Value:
Full template path or false if file does not exist
display - display template from folder template including main layout wrapper
public template::display( $template, mixed $layout = "app"): void
Parameters:
Parameter | Type | Description |
---|---|---|
template |
**** | |
layout |
mixed |
Return Value:
displayJson - returns json data
public template::displayJson( $jsonContent): void
Parameters:
Parameter | Type | Description |
---|---|---|
jsonContent |
**** |
Return Value:
display - display only the template from the template folder without a wrapper
public template::displayPartial( $template): void
Parameters:
Parameter | Type | Description |
---|---|---|
template |
**** |
Return Value:
get - get assigned values
public template::get( $name): array
Parameters:
Parameter | Type | Description |
---|---|---|
name |
**** |
Return Value:
getNotification - pulls notification from the current session
public template::getNotification(): array
Return Value:
displaySubmodule - display a submodule for a given module
public template::displaySubmodule( $alias): void
Parameters:
Parameter | Type | Description |
---|---|---|
alias |
**** |
Return Value:
public template::displayNotification(): mixed
Return Value:
public template::displayInlineNotification(): mixed
Return Value:
public template::redirect(mixed $url): void
Parameters:
Parameter | Type | Description |
---|---|---|
url |
mixed |
Return Value:
public template::getSubdomain(): string
Return Value:
public template::__(mixed $index): string
Parameters:
Parameter | Type | Description |
---|---|---|
index |
mixed |
Return Value:
public template::e(mixed $content): void
Parameters:
Parameter | Type | Description |
---|---|---|
content |
mixed |
Return Value:
public template::escape(mixed $content): string
Parameters:
Parameter | Type | Description |
---|---|---|
content |
mixed |
Return Value:
public template::escapeMinimal(mixed $content): string
Parameters:
Parameter | Type | Description |
---|---|---|
content |
mixed |
Return Value:
getFormattedDateString - returns a language specific formatted date string. wraps language class method
public template::getFormattedDateString( $date): string
Parameters:
Parameter | Type | Description |
---|---|---|
date |
**** | string |
Return Value:
getFormattedTimeString - returns a language specific formatted time string. wraps language class method
public template::getFormattedTimeString( $date): string
Parameters:
Parameter | Type | Description |
---|---|---|
date |
**** | string |
Return Value:
public template::get24HourTimestring(mixed $dateTime): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
dateTime |
mixed |
Return Value:
public template::truncate(mixed $html, mixed $maxLength = 100, mixed $ending = '(...)', mixed $exact = true, mixed $considerHtml = false): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
html |
mixed | |
maxLength |
mixed | |
ending |
mixed | |
exact |
mixed | |
considerHtml |
mixed |
Return Value:
public template::convertRelativePaths(mixed $text): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
text |
mixed |
Return Value:
public template::getModulePicture(): mixed
Return Value:
public template::displayLink(mixed $module, mixed $name, mixed $params = null, mixed $attribute = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
module |
mixed | |
name |
mixed | |
params |
mixed | |
attribute |
mixed |
Return Value:
public template::patchDownloadUrlToFilenameOrAwsUrl(string $textHtml): string
Parameters:
Parameter | Type | Description |
---|---|---|
textHtml |
string |
Return Value:
private template::dispatchTplEvent(string $hookName, mixed $payload = []): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
hookName |
string | |
payload |
mixed |
Return Value:
private template::dispatchTplFilter(string $hookName, mixed $payload = [], mixed $available_params = []): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
hookName |
string | |
payload |
mixed | |
available_params |
mixed |
Return Value:
private template::dispatchTplHook(string $type, string $hookName, mixed $payload = [], mixed $available_params = []): null|mixed
Parameters:
Parameter | Type | Description |
---|---|---|
type |
string | |
hookName |
string | |
payload |
mixed | |
available_params |
mixed |
Return Value:
dispatches an event with context
public static eventhelpers::dispatch_event(string $hook, mixed $available_params = [], string|int $function = null): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
hook |
string | |
available_params |
mixed | |
function |
**string | int** |
Return Value:
dispatches a filter with context
public static eventhelpers::dispatch_filter(string $hook, mixed $payload, mixed $available_params = [], string|int $function = null): mixed
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
hook |
string | |
payload |
mixed | |
available_params |
mixed | |
function |
**string | int** |
Return Value:
Gets the context of the event
private static eventhelpers::get_event_context(mixed $function): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
function |
mixed |
Return Value:
Gets the class context based on path, this uses the same method as the autoloader Helps create unique strings for events/filters
private static eventhelpers::set_class_context(): string
- This method is static.
Return Value:
Gets the caller function name
private static eventhelpers::get_function_context(mixed $functionInt = null): string
This way we don't have to use much memory by using debug_backtrace
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
functionInt |
mixed |
Return Value:
Automatically generated from source code comments on 2023-02-28 using phpDocumentor