3 declare(strict_types=1);
    37     protected array 
$code = array();
    49         return str_replace(
".", 
"_", uniqid(self::PREFIX, 
true));
    57         $this->global_tpl->addOnLoadCode($code, 1);
    58         $this->code[] = 
$code;
    66         if (!count($this->code)) {
    69         $js_out = 
'<script data-replace-marker="script">' . implode(
"\n", $this->code) . 
'</script>';
 addOnLoadCode(string $code)
Add some JavaScript-statements to the on-load handler of the page. 
 
createId()
Create a fresh unique id.This MUST return a new id on every call. 
 
array $code
Cache for all registered JS code. 
 
Wraps global ilTemplate to provide JavaScriptBinding. 
 
getOnLoadCodeAsync()
Get all the registered on-load javascript code for the async context, e.g.return all code inside <scr...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ilGlobalTemplateInterface $global_tpl
 
Provides methods to interface with javascript. 
 
__construct(ilGlobalTemplateInterface $global_tpl)