ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
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.

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

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

Member Function Documentation

◆ edit()

ilExtIdGUI::edit ( )

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

References $form, and initForm().

Referenced by executeCommand().

83  {
84  $form = $this->initForm();
85  $this->tpl->setContent($form->getHTML());
86  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilExtIdGUI::executeCommand ( )
Returns
bool

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

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

69  {
70  $cmd = $this->ctrl->getCmd();
71 
72  switch ($cmd) {
73  case 'edit':
74  $this->edit();
75  break;
76  case 'update':
77  $this->update();
78  break;
79  }
80  return true;
81  }
$cmd
Definition: sahs_server.php:35
+ Here is the call graph for this function:

◆ initForm()

ilExtIdGUI::initForm ( )

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

References $form, and ilTextInputGUI\setValue().

Referenced by edit(), and update().

88  {
89  $form = new ilPropertyFormGUI();
90  $input = new ilTextInputGUI($this->lng->txt("ext_id"), "ext_id");
91  $input->setValue($this->parent_object->getImportId());
92  $form->addItem($input);
93  $form->setFormAction($this->ctrl->getFormAction($this));
94  $form->addCommandButton("update", $this->lng->txt("save"));
95 
96  return $form;
97  }
This class represents a property form user interface.
This class represents a text property in a property form.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilExtIdGUI::update ( )

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

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

Referenced by executeCommand().

99  {
100  $form = $this->initForm();
101  $form->setValuesByPost();
102  if ($form->checkInput()) {
103  $this->parent_object->setImportId($form->getItemByPostVar("ext_id")->getValue());
104  $this->parent_object->update();
105  ilUtil::sendSuccess($this->lng->txt("ext_id_updated"), true);
106  $this->ctrl->redirect($this,"edit");
107  } else {
108  $this->tpl->setContent($form->getHTML());
109  }
110  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ 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: