TemplateSwitcher
in package
TemplateSwitcher
Provides tool to change application template
Table of Contents
Properties
- $_availableTemplates : array<string|int, mixed>
- available templates
- $_templateFallback : string
- template fallback
Methods
- getAvailableTemplates() : array<string|int, mixed>
- get list of available templates
- getTemplate() : string
- get currently loaded template
- isTemplateAvailable() : bool
- check if the provided template is available
- setAvailableTemplates() : mixed
- set available templates
- setTemplateFallback() : mixed
- set the default template
- getSelectedByUserTemplate() : string|null
- get the template selected by user
Properties
$_availableTemplates
available templates
protected
static array<string|int, mixed>
$_availableTemplates
= array()
Tags
$_templateFallback
template fallback
protected
static string
$_templateFallback
= 'bootstrap'
Tags
Methods
getAvailableTemplates()
get list of available templates
public
static getAvailableTemplates() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getTemplate()
get currently loaded template
public
static getTemplate() : string
Tags
Return values
stringisTemplateAvailable()
check if the provided template is available
public
static isTemplateAvailable(string $template) : bool
Parameters
- $template : string
Tags
Return values
boolsetAvailableTemplates()
set available templates
public
static setAvailableTemplates(array<string|int, mixed> $templates) : mixed
Parameters
- $templates : array<string|int, mixed>
Tags
setTemplateFallback()
set the default template
public
static setTemplateFallback(string $template) : mixed
Parameters
- $template : string
Tags
getSelectedByUserTemplate()
get the template selected by user
private
static getSelectedByUserTemplate() : string|null