ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

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

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  }
global $DIC
Definition: saml.php:7
Class ilAccessHandler.
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 91 of file class.ilExtIdGUI.php.

References $form, and initForm().

Referenced by executeCommand().

92  {
93  $form = $this->initForm();
94  $this->tpl->setContent($form->getHTML());
95  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilExtIdGUI::executeCommand ( )
Returns
bool

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

References edit(), and update().

77  {
78  $cmd = $this->ctrl->getCmd();
79 
80  switch ($cmd) {
81  case 'edit':
82  $this->edit();
83  break;
84  case 'update':
85  $this->update();
86  break;
87  }
88  return true;
89  }
+ Here is the call graph for this function:

◆ initForm()

ilExtIdGUI::initForm ( )

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

References $form, and $input.

Referenced by edit(), and update().

98  {
99  $form = new ilPropertyFormGUI();
100  $input = new ilTextInputGUI($this->lng->txt("ext_id"), "ext_id");
101  $input->setValue($this->parent_object->getImportId());
102  $form->addItem($input);
103  $form->setFormAction($this->ctrl->getFormAction($this));
104  $form->addCommandButton("update", $this->lng->txt("save"));
105 
106  return $form;
107  }
This class represents a property form user interface.
This class represents a text property in a property form.
+ Here is the caller graph for this function:

◆ update()

ilExtIdGUI::update ( )

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

References $form, and initForm().

Referenced by executeCommand().

110  {
111  $form = $this->initForm();
112  $form->setValuesByPost();
113  if ($form->checkInput()) {
114  $this->parent_object->setImportId($form->getItemByPostVar("ext_id")->getValue());
115  $this->parent_object->update();
116  ilUtil::sendSuccess($this->lng->txt("ext_id_updated"), true);
117  $this->ctrl->redirect($this, "edit");
118  } else {
119  $this->tpl->setContent($form->getHTML());
120  }
121  }
+ 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: