ContrexxJavascript
in package
This class configures the ContrexxJavascript-object (referred to as 'cx-object' in the comments)
Tags
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', ...), ... )
$instance
private
static mixed
$instance
= \null
Methods
getInstance()
public
static getInstance() : ContrexxJavascript
Return values
ContrexxJavascript —Singleton instance
initJs()
generates all javascript needed to configure the cx-object
public
initJs() : mixed
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
__construct()
private
__construct() : mixed