Methods
Check if the question template offer a specific replacement for that view file.
checkIfTemplateHasView(string $sView): mixed
getCustomAttributes
getCustomAttributes(): array
getFolderName
getFolderName(string $type): string|null
static
deprecated
|
use QuestionTheme::getQuestionXMLPathForBaseType |
Arguments
Response
string|null
Get a new instance of the template object
Each question on the page could have a different template.
getNewInstance(\Question $oQuestion): \QuestionTemplate
static
Get the template folder name
getQuestionTemplateFolderName(): false|string
Called from admin, to generate the template list for a given question type
getQuestionTemplateList(string $type): array
static
todo
|
Move to QuestionTheme? |
Arguments
Response
array
Retrieve the template base path if exist
getTemplatePath(): null|string
getTemplateUrl
getTemplateUrl(): string
Correspondence between question type and the view folder name
Rem: should be in question model. We keep it here for easy access
getTypeToFolder(): array
static
registerAssets
registerAssets()
Register a core css file
registerCssFile(string $sCssFile,string $media = '')
Register a core package file
registerPackage(string $sPackage)
Register a core script
registerScript(string $sScript,integer $pos = \CClientScript::POS_BEGIN)
Register a core script file
registerScriptFile(string $sFile,integer $pos = \CClientScript::POS_BEGIN)
In the future, could retrieve data from DB
setConfig()
Return true if the core css should be loaded.
templateLoadsCoreCss(): null|boolean
Return true if the core css should be loaded.
templateLoadsCoreJs(): null|boolean
Return true if the core packages should be loaded.
templateLoadsCorePackage(): null|boolean
Properties
The current question
oQuestion :\Question
Does this question has a template?
bHasTemplate :boolean
var
|
Does this question has a template? |
Type(s)
boolean
The folder of the template
applied to this question (if no template applied, it's false)
sTemplateFolderName :string
var
|
The folder of the template
applied to this question (if no template applied, it's false) |
Type(s)
string
Array of views the template can handle ($aViews['path_to_my_view']==true)
aViews :array
var
|
Array of views the template can handle ($aViews['path_to_my_view']==true) |
Type(s)
array
oConfig
oConfig :\SimpleXMLElement
Type(s)
\SimpleXMLElement
Does the template provides custom attributes?
bHasCustomAttributes :boolean
var
|
Does the template provides custom attributes? |
Type(s)
boolean
array (attribute=>value)
aCustomAttributes :array
var
|
array (attribute=>value) |
Type(s)
array
The path to the template
sTemplatePath :string
var
|
The path to the template |
Type(s)
string
sTemplateUrl
sTemplateUrl :string
The path to the folder corresponding
to the current question type
sTemplateQuestionPath :string
var
|
The path to the folder corresponding
to the current question type |
Type(s)
string
bHasConfigFile
bHasConfigFile :boolean
The path to the xml file
xmlFile :string
var
|
The path to the xml file |
Type(s)
string
Should it render the core javascript of
this question (script are registered in qanda)
bLoadCoreJs :boolean
var
|
Should it render the core javascript of
this question (script are registered in qanda) |
Type(s)
boolean
Should it render the core CSS of this question
(script are registered in qanda)
bLoadCoreCss :boolean
var
|
Should it render the core CSS of this question
(script are registered in qanda) |
Type(s)
boolean
Should it render the core packages
of this question (script are registered in qanda)
bLoadCorePackage :boolean
var
|
Should it render the core packages
of this question (script are registered in qanda) |
Type(s)
boolean
The instance of question template object
instance :\QuestionTemplate
static