ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 201 of file Base.php.

Member Function Documentation

◆ addOnLoadCode()

LoggingJavaScriptBinding::addOnLoadCode (   $code)

Definition at line 215 of file Base.php.

215  : void
216  {
217  $this->on_load_code[] = $code;
218  }

◆ 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 207 of file Base.php.

References $id.

207  : string
208  {
209  $this->count++;
210  $id = "id_" . $this->count;
211  $this->ids[] = $id;
212  return $id;
213  }
$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 220 of file Base.php.

220  : string
221  {
222  return "";
223  }

Field Documentation

◆ $count

int LoggingJavaScriptBinding::$count = 0
private

Definition at line 205 of file Base.php.

◆ $ids

array LoggingJavaScriptBinding::$ids = array()

Definition at line 204 of file Base.php.

◆ $on_load_code

array LoggingJavaScriptBinding::$on_load_code = array()

Definition at line 203 of file Base.php.


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