Definition at line 17 of file class.ilLicenseGUI.php.
◆ editLicense()
◆ executeCommand()
& ilLicenseGUI::executeCommand |
( |
| ) |
|
Execute a command (main entry point) public.
Definition at line 39 of file class.ilLicenseGUI.php.
References $cmd, and $ilErr.
41 global $rbacsystem,
$ilErr;
44 if (!$rbacsystem->checkAccess(
"edit_permission",$this->parent_gui->object->getRefId()))
46 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->MESSAGE);
49 $cmd = $this->ctrl->getCmd(
"editLicense");
◆ ilLicenseGUI()
ilLicenseGUI::ilLicenseGUI |
( |
& |
$a_parent_gui | ) |
|
Constructor public.
Definition at line 23 of file class.ilLicenseGUI.php.
References $ilCtrl, $lng, and $tpl.
30 $this->lng->loadLanguageModule(
"license");
31 $this->parent_gui =& $a_parent_gui;
32 $this->license =&
new ilLicense($this->parent_gui->object->getId());
◆ initLicenseForm()
ilLicenseGUI::initLicenseForm |
( |
| ) |
|
|
protected |
Definition at line 55 of file class.ilLicenseGUI.php.
References ilNonEditableValueGUI\setInfo(), ilFormPropertyGUI\setInfo(), and ilTextAreaInputGUI\setRows().
Referenced by editLicense(), and updateLicense().
57 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
59 $form->setFormAction($this->ctrl->getFormAction($this,
"updateLicense"));
60 $form->setTitle($this->lng->txt(
'edit_license'));
62 $exist =
new ilNumberInputGUI($this->lng->txt(
"existing_licenses"),
"licenses");
63 $exist->
setInfo($this->lng->txt(
"zero_licenses_explanation"));
64 $exist->setMaxLength(10);
66 $exist->setValue($this->license->getLicenses());
67 $form->addItem($exist);
70 $info_used->
setInfo($this->lng->txt(
"used_licenses_explanation"));
71 $info_used->setValue($this->license->getAccesses());
72 $form->addItem($info_used);
74 $remaining_licenses = ($this->license->getLicenses() ==
"0")
75 ? $this->lng->txt(
"arbitrary")
76 : $this->license->getRemainingLicenses();
79 $info_remain->
setInfo($this->lng->txt(
"remaining_licenses_explanation"));
80 $info_remain->setValue($remaining_licenses);
81 $form->addItem($info_remain);
84 $info_potential->
setInfo($this->lng->txt(
"potential_accesses_explanation"));
85 $info_potential->setValue($this->license->getPotentialAccesses());
86 $form->addItem($info_potential);
90 $comm->setValue($this->license->getRemarks());
91 $form->addItem($comm);
93 $form->addCommandButton(
'updateLicense', $this->lng->txt(
'save'));
setInfo($a_info)
Set Information Text.
This class represents a non editable value in a property form.
setRows($a_rows)
Set Rows.
This class represents a text area property in a property form.
◆ updateLicense()
ilLicenseGUI::updateLicense |
( |
| ) |
|
Save the license form public.
Definition at line 116 of file class.ilLicenseGUI.php.
References editLicense(), initLicenseForm(), and ilUtil\sendSuccess().
119 if($form->checkInput())
121 $this->license->setLicenses($form->getInput(
"licenses"));
122 $this->license->setRemarks($form->getInput(
"remarks"));
123 $this->license->update();
126 $this->ctrl->redirect($this,
"editLicense");
129 $form->setValuesByPost();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editLicense(ilPropertyFormGUI $a_form=null)
Show the license form public.
The documentation for this class was generated from the following file: