ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
 createId ()
 Create a fresh unique id. More...
 
 addOnLoadCode (string $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

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

Private Attributes

int $count = 0
 

Detailed Description

Definition at line 204 of file Base.php.

Member Function Documentation

◆ addOnLoadCode()

LoggingJavaScriptBinding::addOnLoadCode (   $code)

Definition at line 218 of file Base.php.

218 : void
219 {
220 $this->on_load_code[] = $code;
221 }

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

210 : string
211 {
212 $this->count++;
213 $id = "id_" . $this->count;
214 $this->ids[] = $id;
215 return $id;
216 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $count, and $id.

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

223 : string
224 {
225 return "";
226 }

Field Documentation

◆ $count

int LoggingJavaScriptBinding::$count = 0
private

Definition at line 208 of file Base.php.

Referenced by createId().

◆ $ids

array LoggingJavaScriptBinding::$ids = array()

Definition at line 207 of file Base.php.

◆ $on_load_code

array LoggingJavaScriptBinding::$on_load_code = array()

Definition at line 206 of file Base.php.


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