Documentation

ContrexxJavascript
in package

This class configures the ContrexxJavascript-object (referred to as 'cx-object' in the comments)

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

CLOUDREXX Development Team info@cloudrexx.com

subpackage

lib_cxjs

todo

this can be cached

Table of Contents

Properties

$variables  : array<string|int, mixed>
Holds the variables that are to passed to the cx-object
$instance  : mixed

Methods

getInstance()  : ContrexxJavascript
initJs()  : mixed
generates all javascript needed to configure the cx-object
setVariable()  : mixed
sets the variable $name to $value
constructJs()  : mixed
generates all javascript needed to construct the cx-object
variableConfigJs()  : mixed
generates the javascript needed to set all variables on the cx-object
__construct()  : mixed

Properties

$variables

Holds the variables that are to passed to the cx-object

protected array<string|int, mixed> $variables = array()

( 'scope' => array('name' => 'val', ...), ... )

Methods

setVariable()

sets the variable $name to $value

public setVariable(mixed $key, mixed $value[, mixed $scope = null ]) : mixed
Parameters
$key : mixed

string on single value, else array('key' => val)

$value : mixed

value (mandatory) on single value, else scope (optional)

$scope : mixed = null

scope (mandatory) on single value, else unused

constructJs()

generates all javascript needed to construct the cx-object

protected constructJs() : mixed

variableConfigJs()

generates the javascript needed to set all variables on the cx-object

protected variableConfigJs() : mixed

        
On this page

Search results