ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 49 of file class.ilExtIdGUI.php.

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

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 89 of file class.ilExtIdGUI.php.

89 {
90 $form = $this->initForm();
91 $this->tpl->setContent($form->getHTML());
92 }

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 74 of file class.ilExtIdGUI.php.

75 {
76 $cmd = $this->ctrl->getCmd();
77
78 switch ($cmd) {
79 case 'edit':
80 $this->edit();
81 break;
82 case 'update':
83 $this->update();
84 break;
85 }
86 return true;
87 }
$cmd
Definition: sahs_server.php:35

References $cmd, edit(), and update().

+ Here is the call graph for this function:

◆ initForm()

ilExtIdGUI::initForm ( )

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

94 {
96 $input = new ilTextInputGUI($this->lng->txt("ext_id"), "ext_id");
97 $input->setValue($this->parent_object->getImportId());
98 $form->addItem($input);
99 $form->setFormAction($this->ctrl->getFormAction($this));
100 $form->addCommandButton("update", $this->lng->txt("save"));
101
102 return $form;
103 }
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 105 of file class.ilExtIdGUI.php.

105 {
106 $form = $this->initForm();
107 $form->setValuesByPost();
108 if ($form->checkInput()) {
109 $this->parent_object->setImportId($form->getItemByPostVar("ext_id")->getValue());
110 $this->parent_object->update();
111 ilUtil::sendSuccess($this->lng->txt("ext_id_updated"), true);
112 $this->ctrl->redirect($this,"edit");
113 } else {
114 $this->tpl->setContent($form->getHTML());
115 }
116 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $form, initForm(), and ilUtil\sendSuccess().

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 27 of file class.ilExtIdGUI.php.

◆ $form

ilExtIdGUI::$form
protected

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

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

◆ $ilAccess

ilExtIdGUI::$ilAccess
protected

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

Referenced by __construct().

◆ $lng

ilExtIdGUI::$lng
protected

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

Referenced by __construct().

◆ $object

ilExtIdGUI::$object
protected

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

◆ $tabs_gui

ilExtIdGUI::$tabs_gui
protected

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

◆ $toolbar

ilExtIdGUI::$toolbar
protected

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

◆ $tpl

ilExtIdGUI::$tpl
protected

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

Referenced by __construct().


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