JSEngineConfiguration

Class JSEngineConfiguration

category

System

package

Extensions

Methods

__construct

__construct(\NonEmptyStringType $baseUrl, \NonEmptyStringType $templatePath, \LanguageCode $languageCode, \LanguageTextManager $languageTextManager, \EditableKeyValueCollection $sections, \BoolType $debugMode, \StringType $pageToken = null, \StringType $cacheToken = null) 

Arguments

$templatePath

\NonEmptyStringType

$languageCode

\LanguageCode

$languageTextManager

\LanguageTextManager

$debugMode

\BoolType

$pageToken

\StringType

$cacheToken

\StringType

Helper method for adding additional language sections.

_getSections() : array

Overload example for adding the section "section_name":

protected function _getSections() { $additionalSection = array('js_section_name' => 'section_name'); $this->sections = array_merge($this->sections, $additionalSection);

return parent::_getSections();

}

Use in JS: jse.core.lang.translate('phrase_name', 'js_section_name') // phrase value will be returned;

Visit https://developers.gambio.de for more information.

Response

array

Get translations array.

_getTranslations() : string

Response

string

Initialize JSEngine configuration.

_init() 

Get JSEngine configuration as an JSON encoded string

asJson() : string

Response

string

getJavaScript

getJavaScript() : string

Response

string

Properties

config

config : array
var

Type(s)

array

languageTextManager

languageTextManager : \LanguageTextManager
var

Type(s)

\LanguageTextManager

sections

sections : array
var

Type(s)

array

environment

environment : string
var

Type(s)

string

baseUrl

baseUrl : string
var

Type(s)

string

templatePath

templatePath : string
var

Type(s)

string

languageCode

languageCode : string
var

Type(s)

string

pageToken

pageToken : string
var

Type(s)

string

cacheToken

cacheToken : string
var

Type(s)

string

bustFiles

bustFiles : boolean
var

Type(s)

boolean