Class TemplateConfig Common methods for TemplateConfiguration and TemplateManifest
package | Default |
---|
__toString(): string
todo | document me |
---|---|
string
changeMotherConfiguration( $sType, $aSettings): array
var | string the type of settings to change (css or js) array array of local setting |
---|---|
array
formatToJsonArray(array|object $oFiled,boolean $bConvertEmptyToString = false): string
It checks that the correct values is inserted.
array|object
the filed to convert
boolean
formats empty values as empty strings instead of objects.
string
json
getAllDbTemplateFolders(): array|null
todo | document me |
---|---|
array|null
getApiVersion(): integer
integer
getClassAndAttributes()
Most classes and id and attributes from template views are defined here. So even if users extends/modify the core template, we can still apply some debugs
NB 1: Some of the classes should be bring back to templates
NB 2: This is a temporary function. Before releasing to master, it will be replaced by a XML file inside the template itself So third party providers will also be able to use this mechanics to provides bug fixes/enhancement to their templates
getDependsPackages(\TemplateConfiguration $oTemplate): array<mixed,string>
uses |
---|
\TemplateConfiguration
array<mixed,string>
getFilePath(string $sFile,\TemplateConfig $oTemplate): string|false
It will check if css/js (relative to path), or view (view path) It will search for current template and mother templates
string
relative path to the file
string|false
getFilesToLoad( $oTemplate, $sType): array
var | string js or css ? |
---|---|
array
getTemplateForAsset(string $sFile,\TemplateConfiguration $oRTemplate): \TemplateConfiguration|boolean
string
the file to check
\TemplateConfiguration
the template where the custom option page should be looked for
\TemplateConfiguration|boolean
getTemplateForFile(string $sFile,\TemplateConfig $oRTemplate,boolean $force = false): \TemplateConfig
string
the file to look for (must contain relative path, unless it's a view file)
boolean
file to be in template or mother template
\TemplateConfig
getTemplatesWithNoDb(): array|null
todo | document me |
---|---|
array|null
getTemplateURL(): string
string
template url
importManifest(string $sTemplateName,array $aDatas): boolean
Throws |
|
---|
string
the name of the template to import
array
boolean
true on success | exception
removeFiles()
removeFilesFromPackage(string $sPackageName,array $aPackage,string $sType,array $aFilesToRemove)
string
name of the package
array
the package to check (as provided by Yii::app()->clientScript)
string
the type of file (css or js)
array
an array containing the files to chech and remove
setIsStandard(): boolean|null
todo | document me missing return value (php warning) |
---|---|
boolean|null
throwConsoleError(string|null $sCustomMessage = null)
todo | document me |
---|---|
Throws |
|
string|null
uninstall(string $templatename): boolean|integer
todo | document me |
---|
string
Name of Template
boolean|integer
sTemplateName :string
var | The template name |
---|
string
sPackageName :string
var | Name of the asset package of this template |
---|
string
path :string
var | Path of this template |
---|
string
sTemplateurl :string
var | Url to reach the framework |
---|
string
viewPath :string
var | Path of the views files (twig template) |
---|
string
filesPath :string
var | Path of the tmeplate's files |
---|
string
cssFramework :object
var | What framework css is used |
---|
object
isStandard :boolean
var | Is this template a core one? |
---|
boolean
config :\SimpleXMLElement
var | Will contain the config.xml |
---|
\SimpleXMLElement
oMotherTemplate :\TemplateConfiguration
var | The mother template object This is used when a template inherit another one. |
---|
\TemplateConfiguration
oOptions :object
var | The template options |
---|
object
oOptionAttributes :
depends :array<mixed,string>
var | List of all dependencies (could be more that just the config.xml packages) |
---|
array<mixed,string>
apiVersion :integer
var | Version of the LS API when created. Must be private : disallow update |
---|
integer
iSurveyId :\int?
var | The current Survey Id. It can be void. It's use only to retrieve the current template of a given survey |
---|
\int?
hasConfigFile :string
var | Does it has a config.xml file? |
---|
string
packages :array<mixed,string>
var | Array of package dependencies defined in config.xml |
---|
array<mixed,string>
xmlFile :string
var | What xml config file does it use? (config/minimal) |
---|
string
aCssFrameworkReplacement :array
var | Css Framework Replacement |
---|
array
allDbTemplateFolders :
aTemplatesWithoutDB :