ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilJavaScriptBinding.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2016 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
11 const PREFIX = "il_ui_fw_";
12
16 private $global_tpl;
17
19 $this->global_tpl = $global_tpl;
20 }
21
25 public function createId() {
26 return str_replace(".", "_", uniqid(self::PREFIX, true));
27 }
28
32 public function addOnLoadCode($code) {
33 $this->global_tpl->addOnLoadCode($code);
34 }
35}
An exception for terminatinating execution or to throw for unit testing.
Wraps global ilTemplate to provide JavaScriptBinding.
addOnLoadCode($code)
Add some JavaScript-statements to the on-load handler of the page.null
createId()
Create a fresh unique id.This MUST return a new id on every call.string
special template class to simplify handling of ITX/PEAR
$code
Definition: example_050.php:99
Provides methods to interface with javascript.