36 return str_replace(
".",
"_", uniqid(self::PREFIX,
true));
44 $this->global_tpl->addOnLoadCode(
$code);
45 $this->code[] =
$code;
53 if (!count($this->code)) {
56 $js_out =
'<script>' . implode(
"\n", $this->code) .
'</script>';
createId()
Create a fresh unique id.This MUST return a new id on every call.string
Wraps global ilTemplate to provide JavaScriptBinding.
__construct(\ilTemplate $global_tpl)
getOnLoadCodeAsync()
Get all the registered on-load javascript code for the async context, e.g.return all code inside <scr...
special template class to simplify handling of ITX/PEAR
Provides methods to interface with javascript.
Create styles array
The data for the language used.
addOnLoadCode($code)
Add some JavaScript-statements to the on-load handler of the page.null