AdminTheme

Extends \CFormModel

Admin Theme Model

package

LimeSurvey

subpackage

Backend

Methods

Get the list of admin theme, as an array containing each configuration object for each template

getAdminThemeList() : array
static

Response

array

the array of configuration object

Set the Admin Theme : - checks if the required template exists - set the admin theme variables - set the admin theme constants - Register all the needed CSS/JS files

setAdminTheme() : \AdminTheme

Response

\AdminTheme

Register all the styles and scripts of the current template.

registerStylesAndScripts() 

Check if RTL is needed, use asset manager if needed. This function is public because it appears that sometime, the package need to be register again in header (probably a cache problem)

Get instance of theme object.

getInstance() : \AdminTheme
static

Will instantiate the Admin Theme object first time it is called. Please use this instead of global variable.

Response

\AdminTheme

getOtherAssets

getOtherAssets() : string[]
static

Response

string[]

Return an array containing the configuration object of all templates in a given directory

getThemeList(string $sDir) : array
static

Arguments

$sDir

string

the directory to scan

Response

array

the array of object

Few constants depending on Template

defineConstants() 

Use to check if admin theme is standard

isStandardAdminTheme(string $sAdminThemeName) : boolean
var

the name of the template

Arguments

$sAdminThemeName

string

Response

boolean

return true if it's a standard template, else false

Properties

Admin Theme's name

name : string
var

Admin Theme's name

Type(s)

string

Admin Theme's path

path : string
var

Admin Theme's path

Type(s)

string

URL to reach Admin Theme (used to get CSS/JS/Files when asset manager is off)

sTemplateUrl : string
var

URL to reach Admin Theme (used to get CSS/JS/Files when asset manager is off)

Type(s)

string

Contains the Admin Theme's configuration file

config : mixed
var

Contains the Admin Theme's configuration file

Type(s)

mixed

If true, force the use of asset manager even if debug mode is on (useful to debug asset manager's problems)

use_asset_manager : boolean
static
var

If true, force the use of asset manager even if debug mode is on (useful to debug asset manager's problems)

Type(s)

boolean

The instance of theme object

instance : \AdminTheme
static
var

The instance of theme object

Type(s)

\AdminTheme