ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilLicenseOverviewGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once "./Services/License/classes/class.ilLicense.php";
5
18{
21
26 function ilLicenseOverviewGUI(&$a_parent_gui, $a_mode = self::LIC_MODE_REPOSITORY)
27 {
28 global $ilCtrl, $tpl, $lng;
29
30 $this->mode = $a_mode;
31 $this->ctrl =& $ilCtrl;
32 $this->tpl =& $tpl;
33 $this->lng =& $lng;
34 $this->lng->loadLanguageModule("license");
35 $this->parent_gui =& $a_parent_gui;
36 }
37
42 function executeCommand()
43 {
44 global $rbacsystem, $ilErr;
45
46 // access to all functions in this class are only allowed if read is granted
47 if (!$rbacsystem->checkAccess("read",$this->parent_gui->object->getRefId()))
48 {
49 $ilErr->raiseError($this->lng->txt("permission_denied"),$ilErr->MESSAGE);
50 }
51
52 $cmd = $this->ctrl->getCmd("showLicenses");
53 $this->$cmd();
54
55 return true;
56 }
57
62 function showLicenses()
63 {
64 include_once './Services/License/classes/class.ilLicenseOverviewTableGUI.php';
65 $tbl = new ilLicenseOverviewTableGUI($this, "showLicenses", $this->mode, $this->parent_gui);
66
67 include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
68 $panel = ilPanelGUI::getInstance();
69 $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
70 $panel->setBody('<div class="small">'.
71 $this->lng->txt("used_licenses_explanation")."<br/>".
72 $this->lng->txt("remaining_licenses_explanation")."<br/>".
73 $this->lng->txt("potential_accesses_explanation").
74 "</div>"
75 );
76
77 $this->tpl->setContent($tbl->getHTML()."<br />".$panel->getHTML());
78 }
79}
global $tpl
Definition: ilias.php:8
ilLicenseOverviewGUI(&$a_parent_gui, $a_mode=self::LIC_MODE_REPOSITORY)
Constructor @access public.
showLicenses()
Show the license list @access public.
executeCommand()
Execute a command (main entry point) @access public.
const PANEL_STYLE_SECONDARY
static getInstance()
Get instance.
$tbl
Definition: example_048.php:81
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35