ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilExtIdGUI Class Reference

Class ilExtIdGUI. More...

+ Collaboration diagram for ilExtIdGUI:

Public Member Functions

 __construct ($parent_gui)
 
 executeCommand ()
 
 edit ()
 
 initForm ()
 
 update ()
 

Protected Attributes

 $tabs_gui
 
 $form
 
 $toolbar
 
 $ctrl
 
 $tpl
 
 $object
 
 $lng
 
 $ilAccess
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilExtIdGUI::__construct (   $parent_gui)
Parameters
$parent_gui

Definition at line 50 of file class.ilExtIdGUI.php.

51 {
52 global $DIC;
53 $tpl = $DIC['tpl'];
54 $ilCtrl = $DIC['ilCtrl'];
55 $ilTabs = $DIC['ilTabs'];
56 $ilToolbar = $DIC['ilToolbar'];
57 $lng = $DIC['lng'];
58 $ilAccess = $DIC['ilAccess'];
59 $this->tpl = $tpl;
60 $this->ctrl = $ilCtrl;
61 $this->parent_gui = $parent_gui;
62 $this->parent_object = $parent_gui->object;
63 $this->tabs_gui = $this->parent_gui->tabs_gui;
64 $this->toolbar = $ilToolbar;
65 $this->lng = $lng;
66 $this->ilAccess = $ilAccess;
67 $this->lng->loadLanguageModule('user');
68 if (!$this->ilAccess->checkaccess("write", "", $this->parent_gui->object->getRefId())) {
69 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
70 }
71 }
Class ilAccessHandler.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46

References $DIC, $ilAccess, $ilCtrl, $lng, $tpl, and ilUtil\sendFailure().

+ Here is the call graph for this function:

Member Function Documentation

◆ edit()

ilExtIdGUI::edit ( )

Definition at line 94 of file class.ilExtIdGUI.php.

95 {
96 $form = $this->initForm();
97 $this->tpl->setContent($form->getHTML());
98 }

References $form, and initForm().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilExtIdGUI::executeCommand ( )
Returns
bool

Definition at line 77 of file class.ilExtIdGUI.php.

78 {
79 $cmd = $this->ctrl->getCmd();
80
81 switch ($cmd) {
82 case 'edit':
83 $this->edit();
84 break;
85 case 'update':
86 $this->update();
87 break;
88 }
89
90 return true;
91 }

References edit(), and update().

+ Here is the call graph for this function:

◆ initForm()

ilExtIdGUI::initForm ( )

Definition at line 101 of file class.ilExtIdGUI.php.

102 {
103 $form = new ilPropertyFormGUI();
104 $input = new ilTextInputGUI($this->lng->txt("ext_id"), "ext_id");
105 $input->setValue($this->parent_object->getImportId());
106 $form->addItem($input);
107 $form->setFormAction($this->ctrl->getFormAction($this));
108 $form->addCommandButton("update", $this->lng->txt("save"));
109
110 return $form;
111 }
This class represents a property form user interface.
This class represents a text property in a property form.

References $form.

Referenced by edit(), and update().

+ Here is the caller graph for this function:

◆ update()

ilExtIdGUI::update ( )

Definition at line 114 of file class.ilExtIdGUI.php.

115 {
116 $form = $this->initForm();
117 $form->setValuesByPost();
118 if ($form->checkInput()) {
119 $this->parent_object->setImportId($form->getItemByPostVar("ext_id")->getValue());
120 $this->parent_object->update();
121 ilUtil::sendSuccess($this->lng->txt("ext_id_updated"), true);
122 $this->ctrl->redirect($this, "edit");
123 } else {
124 $this->tpl->setContent($form->getHTML());
125 }
126 }

References $form, and initForm().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilExtIdGUI::$ctrl
protected

Definition at line 28 of file class.ilExtIdGUI.php.

◆ $form

ilExtIdGUI::$form
protected

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

Referenced by edit(), initForm(), and update().

◆ $ilAccess

ilExtIdGUI::$ilAccess
protected

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

Referenced by __construct().

◆ $lng

ilExtIdGUI::$lng
protected

Definition at line 40 of file class.ilExtIdGUI.php.

Referenced by __construct().

◆ $object

ilExtIdGUI::$object
protected

Definition at line 36 of file class.ilExtIdGUI.php.

◆ $tabs_gui

ilExtIdGUI::$tabs_gui
protected

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

◆ $toolbar

ilExtIdGUI::$toolbar
protected

Definition at line 24 of file class.ilExtIdGUI.php.

◆ $tpl

ilExtIdGUI::$tpl
protected

Definition at line 32 of file class.ilExtIdGUI.php.

Referenced by __construct().


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