ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

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

Member Function Documentation

◆ executeCommand()

ilLicenseOverviewGUI::executeCommand ( )
Returns
bool

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

References $ilErr.

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

◆ showLicenses()

ilLicenseOverviewGUI::showLicenses ( )
protected

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

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

77  {
78  include_once './Services/License/classes/class.ilLicenseOverviewTableGUI.php';
79  $tbl = new ilLicenseOverviewTableGUI($this, "showLicenses", $this->mode, $this->parent_gui);
80 
81  include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
82  $panel = ilPanelGUI::getInstance();
83  $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
84  $panel->setBody('<div class="small">' . $this->lng->txt("used_licenses_explanation") . "<br/>"
85  . $this->lng->txt("remaining_licenses_explanation") . "<br/>" . $this->lng->txt("potential_accesses_explanation") . "</div>");
86 
87  $this->tpl->setContent($tbl->getHTML() . "<br />" . $panel->getHTML());
88  }
$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: