ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
LoggingJavaScriptBinding Class Reference
+ Inheritance diagram for LoggingJavaScriptBinding:
+ Collaboration diagram for LoggingJavaScriptBinding:

Public Member Functions

 createId ()
 Create a fresh unique id. More...
 
 addOnLoadCode ($code)
 
 getOnLoadCodeAsync ()
 Get all the registered on-load javascript code for the async context, e.g. More...
 
- Public Member Functions inherited from ILIAS\UI\Implementation\Render\JavaScriptBinding
 addOnLoadCode (string $code)
 Add some JavaScript-statements to the on-load handler of the page. More...
 

Data Fields

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

Private Attributes

int $count = 0
 

Detailed Description

Definition at line 193 of file Base.php.

Member Function Documentation

◆ addOnLoadCode()

LoggingJavaScriptBinding::addOnLoadCode (   $code)

Definition at line 207 of file Base.php.

207  : void
208  {
209  $this->on_load_code[] = $code;
210  }

◆ createId()

LoggingJavaScriptBinding::createId ( )

Create a fresh unique id.

This MUST return a new id on every call.

Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.

Definition at line 199 of file Base.php.

References $id.

199  : string
200  {
201  $this->count++;
202  $id = "id_" . $this->count;
203  $this->ids[] = $id;
204  return $id;
205  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ getOnLoadCodeAsync()

LoggingJavaScriptBinding::getOnLoadCodeAsync ( )

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

return all code inside <script> tags

Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.

Definition at line 212 of file Base.php.

212  : string
213  {
214  return "";
215  }

Field Documentation

◆ $count

int LoggingJavaScriptBinding::$count = 0
private

Definition at line 197 of file Base.php.

◆ $ids

array LoggingJavaScriptBinding::$ids = array()

Definition at line 196 of file Base.php.

◆ $on_load_code

array LoggingJavaScriptBinding::$on_load_code = array()

Definition at line 195 of file Base.php.


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