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 
18  public function __construct(\ilTemplate $global_tpl) {
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 }
createId()
Create a fresh unique id.This MUST return a new id on every call.string
$code
Definition: example_050.php:99
Wraps global ilTemplate to provide JavaScriptBinding.
special template class to simplify handling of ITX/PEAR
Provides methods to interface with javascript.
addOnLoadCode($code)
Add some JavaScript-statements to the on-load handler of the page.null