ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLicenseOverviewGUI Class Reference
+ Collaboration diagram for ilLicenseOverviewGUI:

Public Member Functions

 ilLicenseOverviewGUI (&$a_parent_gui, $a_mode=self::LIC_MODE_REPOSITORY)
 Constructor @access public. More...
 
 executeCommand ()
 Execute a command (main entry point) @access public. More...
 
 showLicenses ()
 Show the license list @access public. More...
 

Data Fields

const LIC_MODE_ADMINISTRATION = 1
 
const LIC_MODE_REPOSITORY = 2
 

Detailed Description

Definition at line 17 of file class.ilLicenseOverviewGUI.php.

Member Function Documentation

◆ executeCommand()

ilLicenseOverviewGUI::executeCommand ( )

Execute a command (main entry point) @access public.

Definition at line 42 of file class.ilLicenseOverviewGUI.php.

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 }
$cmd
Definition: sahs_server.php:35

References $cmd, and $ilErr.

◆ ilLicenseOverviewGUI()

ilLicenseOverviewGUI::ilLicenseOverviewGUI ( $a_parent_gui,
  $a_mode = self::LIC_MODE_REPOSITORY 
)

Constructor @access public.

Definition at line 26 of file class.ilLicenseOverviewGUI.php.

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 }
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40

References $ilCtrl, $lng, and $tpl.

◆ showLicenses()

ilLicenseOverviewGUI::showLicenses ( )

Show the license list @access public.

Definition at line 62 of file class.ilLicenseOverviewGUI.php.

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 }
const PANEL_STYLE_SECONDARY
static getInstance()
Get instance.
$tbl
Definition: example_048.php:81

References $tbl, ilPanelGUI\getInstance(), and ilPanelGUI\PANEL_STYLE_SECONDARY.

+ Here is the call graph for this function:

Field Documentation

◆ LIC_MODE_ADMINISTRATION

const ilLicenseOverviewGUI::LIC_MODE_ADMINISTRATION = 1

◆ LIC_MODE_REPOSITORY

const ilLicenseOverviewGUI::LIC_MODE_REPOSITORY = 2

Definition at line 20 of file class.ilLicenseOverviewGUI.php.

Referenced by ilObjCourseGUI\executeCommand().


The documentation for this class was generated from the following file: