ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 133 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 145 of file Base.php.

References $code.

146  {
147  $this->on_load_code[] = $code;
148  }
$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 137 of file Base.php.

References $id.

138  {
139  $this->count++;
140  $id = "id_" . $this->count;
141  $this->ids[] = $id;
142  return $id;
143  }
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 149 of file Base.php.

150  {
151  }

Field Documentation

◆ $count

LoggingJavaScriptBinding::$count = 0
private

Definition at line 135 of file Base.php.

◆ $ids

LoggingJavaScriptBinding::$ids = array()

Definition at line 136 of file Base.php.

◆ $on_load_code

LoggingJavaScriptBinding::$on_load_code = array()

Definition at line 144 of file Base.php.


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