-
Notifications
You must be signed in to change notification settings - Fork 1
/
jsonMenu.php
66 lines (47 loc) · 1.03 KB
/
jsonMenu.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
$jsonMenu = new jsonMenu();
$jsonMenu->draw();
/**
* Class jsonMenu
*
* @author Fabian Schmid <[email protected]>
*/
class jsonMenu {
/**
* @var int
*/
protected $menu_id = 0;
public function __construct() {
self::initILIAS();
$this->setMenuId($_REQUEST['menu_id']);
$this->initHeader();
}
public function initHeader() {
// header('Content-type: application/json');
}
public function draw() {
$menu_gui = new ctrlmmMenuGUI($this->getMenuId());
echo $menu_gui->getHTML();
}
/**
* @param int $menu_id
*/
public function setMenuId($menu_id) {
$this->menu_id = $menu_id;
}
/**
* @return int
*/
public function getMenuId() {
return $this->menu_id;
}
private static function initILIAS() {
chdir(stristr(__FILE__, 'Customizing', true));
require_once('include/inc.header.php');
self::includes();
}
private static function includes() {
require_once('./Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/CtrlMainMenu/classes/Menu/class.ctrlmmMenuGUI.php');
}
}
?>