Documentation

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
access

protected

static

$_templateFallback

template fallback

protected static string $_templateFallback = 'bootstrap'
Tags
access

protected

static

Methods

getAvailableTemplates()

get list of available templates

public static getAvailableTemplates() : array<string|int, mixed>
Tags
access

public

static
Return values
array<string|int, mixed>

getTemplate()

get currently loaded template

public static getTemplate() : string
Tags
access

public

static
Return values
string

isTemplateAvailable()

check if the provided template is available

public static isTemplateAvailable(string $template) : bool
Parameters
$template : string
Tags
access

public

static
Return values
bool

setAvailableTemplates()

set available templates

public static setAvailableTemplates(array<string|int, mixed> $templates) : mixed
Parameters
$templates : array<string|int, mixed>
Tags
access

public

static

setTemplateFallback()

set the default template

public static setTemplateFallback(string $template) : mixed
Parameters
$template : string
Tags
access

public

static

getSelectedByUserTemplate()

get the template selected by user

private static getSelectedByUserTemplate() : string|null
Tags
access

private

static
Return values
string|null

        
On this page

Search results