ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
LoggingJavaScriptBinding Class Reference
+ Inheritance diagram for LoggingJavaScriptBinding:
+ Collaboration diagram for LoggingJavaScriptBinding:

Public Member Functions

 createId ()
 Create a fresh unique id. More...
 
 addOnLoadCode ($code)
 Add some JavaScript-statements to the on-load handler of the page. More...
 
 getOnLoadCodeAsync ()
 Get all the registered on-load javascript code for the async context, e.g. More...
 

Data Fields

 $ids = array()
 
 $on_load_code = array()
 

Private Attributes

 $count = 0
 

Detailed Description

Definition at line 119 of file Base.php.

Member Function Documentation

◆ addOnLoadCode()

LoggingJavaScriptBinding::addOnLoadCode (   $code)

Add some JavaScript-statements to the on-load handler of the page.

Parameters
string$code
Returns
null

Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.

Definition at line 131 of file Base.php.

References $code.

132  {
133  $this->on_load_code[] = $code;
134  }
$code
Definition: example_050.php:99

◆ createId()

LoggingJavaScriptBinding::createId ( )

Create a fresh unique id.

This MUST return a new id on every call.

Returns
string

Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.

Definition at line 123 of file Base.php.

References $id.

124  {
125  $this->count++;
126  $id = "id_" . $this->count;
127  $this->ids[] = $id;
128  return $id;
129  }
if(!array_key_exists('StateId', $_REQUEST)) $id

◆ getOnLoadCodeAsync()

LoggingJavaScriptBinding::getOnLoadCodeAsync ( )

Get all the registered on-load javascript code for the async context, e.g.

return all code inside <script> tags

Returns
string

Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.

Definition at line 135 of file Base.php.

136  {
137  }

Field Documentation

◆ $count

LoggingJavaScriptBinding::$count = 0
private

Definition at line 121 of file Base.php.

◆ $ids

LoggingJavaScriptBinding::$ids = array()

Definition at line 122 of file Base.php.

◆ $on_load_code

LoggingJavaScriptBinding::$on_load_code = array()

Definition at line 130 of file Base.php.


The documentation for this class was generated from the following file: