ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilLicenseOverviewGUI Class Reference
+ Collaboration diagram for ilLicenseOverviewGUI:

Public Member Functions

 __construct (ilObjectGUI $a_parent_gui, $a_mode=self::LIC_MODE_REPOSITORY)
 ilLicenseOverviewGUI constructor. More...
 
 executeCommand ()
 

Data Fields

const LIC_MODE_ADMINISTRATION = 1
 
const LIC_MODE_REPOSITORY = 2
 

Protected Member Functions

 showLicenses ()
 

Protected Attributes

 $mode
 
 $ctrl
 
 $tpl
 
 $lng
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

ilLicenseOverviewGUI constructor.

Parameters
\ilObjectGUI$a_parent_gui
int$a_mode

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

References $ilCtrl, $lng, and $tpl.

44  {
45  global $ilCtrl, $tpl, $lng;
46 
47  $this->mode = $a_mode;
48  $this->ctrl = $ilCtrl;
49  $this->tpl = $tpl;
50  $this->lng = $lng;
51  $this->lng->loadLanguageModule("license");
52  $this->parent_gui = $a_parent_gui;
53  }
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ executeCommand()

ilLicenseOverviewGUI::executeCommand ( )
Returns
bool

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

References $cmd, and $ilErr.

59  {
60  global $rbacsystem, $ilErr;
61 
62  // access to all functions in this class are only allowed if read is granted
63  if (!$rbacsystem->checkAccess("read", $this->parent_gui->object->getRefId())) {
64  $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
65  }
66 
67  $cmd = $this->ctrl->getCmd("showLicenses");
68  $this->$cmd();
69 
70  return true;
71  }
global $ilErr
Definition: raiseError.php:16
$cmd
Definition: sahs_server.php:35

◆ showLicenses()

ilLicenseOverviewGUI::showLicenses ( )
protected

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

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

74  {
75  include_once './Services/License/classes/class.ilLicenseOverviewTableGUI.php';
76  $tbl = new ilLicenseOverviewTableGUI($this, "showLicenses", $this->mode, $this->parent_gui);
77 
78  include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
79  $panel = ilPanelGUI::getInstance();
80  $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
81  $panel->setBody('<div class="small">' . $this->lng->txt("used_licenses_explanation") . "<br/>"
82  . $this->lng->txt("remaining_licenses_explanation") . "<br/>" . $this->lng->txt("potential_accesses_explanation") . "</div>");
83 
84  $this->tpl->setContent($tbl->getHTML() . "<br />" . $panel->getHTML());
85  }
$tbl
Definition: example_048.php:81
static getInstance()
Get instance.
const PANEL_STYLE_SECONDARY
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilLicenseOverviewGUI::$ctrl
protected

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

◆ $lng

ilLicenseOverviewGUI::$lng
protected

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

Referenced by __construct().

◆ $mode

ilLicenseOverviewGUI::$mode
protected

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

◆ $tpl

ilLicenseOverviewGUI::$tpl
protected

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

Referenced by __construct().

◆ LIC_MODE_ADMINISTRATION

const ilLicenseOverviewGUI::LIC_MODE_ADMINISTRATION = 1

◆ LIC_MODE_REPOSITORY

const ilLicenseOverviewGUI::LIC_MODE_REPOSITORY = 2

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

Referenced by ilObjCourseGUI\executeCommand().


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