phpDocumentor

JSEngineConfiguration
in package

Class JSEngineConfiguration

Tags
category

System

Table of Contents

$baseUrl  : string
$bustFiles  : bool
$cacheToken  : string
$config  : array<string|int, mixed>
$environment  : string
$languageCode  : string
$languageTextManager  : LanguageTextManager
$pageToken  : string
$sections  : array<string|int, mixed>
$templatePath  : string
__construct()  : mixed
asJson()  : string
Get JSEngine configuration as an JSON encoded string
getJavaScript()  : string
_getSections()  : array<string|int, mixed>
Helper method for adding additional language sections.
_getTranslations()  : string
Get translations array.
_init()  : mixed
Initialize JSEngine configuration.

Properties

Methods

__construct()

public __construct(NonEmptyStringType $baseUrl, NonEmptyStringType $templatePath, LanguageCode $languageCode, LanguageTextManager $languageTextManager, EditableKeyValueCollection $sections, BoolType $debugMode[, StringType $pageToken = null ][, StringType $cacheToken = null ]) : mixed
Parameters
$baseUrl : NonEmptyStringType
$templatePath : NonEmptyStringType
$languageCode : LanguageCode
$languageTextManager : LanguageTextManager
$sections : EditableKeyValueCollection
$debugMode : BoolType
$pageToken : StringType = null
$cacheToken : StringType = null
Return values
mixed

asJson()

Get JSEngine configuration as an JSON encoded string

public asJson() : string
Return values
string

_getSections()

Helper method for adding additional language sections.

protected _getSections() : array<string|int, mixed>

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.

Return values
array<string|int, mixed>

Search results