ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

ilExtIdGUI::__construct (   $parent_gui)
Parameters
$parent_gui

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

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

{
global $tpl, $ilCtrl, $ilTabs, $ilToolbar, $lng, $ilAccess;
$this->tpl = $tpl;
$this->ctrl = $ilCtrl;
$this->parent_gui = $parent_gui;
$this->parent_object = $parent_gui->object;
$this->tabs_gui = $this->parent_gui->tabs_gui;
$this->toolbar = $ilToolbar;
$this->lng = $lng;
$this->ilAccess = $ilAccess;
$this->lng->loadLanguageModule('user');
if (! $this->ilAccess->checkaccess("write", "", $this->parent_gui->object->getRefId())) {
ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilExtIdGUI::edit ( )

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

References $form, and initForm().

Referenced by executeCommand().

{
$form = $this->initForm();
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilExtIdGUI::executeCommand ( )
Returns
bool

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

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

{
$cmd = $this->ctrl->getCmd();
switch ($cmd) {
case 'edit':
$this->edit();
break;
case 'update':
$this->update();
break;
}
return true;
}

+ Here is the call graph for this function:

ilExtIdGUI::initForm ( )

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

References $form, and ilTextInputGUI\setValue().

Referenced by edit(), and update().

{
$input = new ilTextInputGUI($this->lng->txt("ext_id"), "ext_id");
$input->setValue($this->parent_object->getImportId());
$form->addItem($input);
$form->setFormAction($this->ctrl->getFormAction($this));
$form->addCommandButton("update", $this->lng->txt("save"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilExtIdGUI::update ( )

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

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

Referenced by executeCommand().

{
$form = $this->initForm();
$form->setValuesByPost();
if ($form->checkInput()) {
$this->parent_object->setImportId($form->getItemByPostVar("ext_id")->getValue());
$this->parent_object->update();
ilUtil::sendSuccess($this->lng->txt("ext_id_updated"), true);
$this->ctrl->redirect($this,"edit");
} else {
$this->tpl->setContent($form->getHTML());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilExtIdGUI::$ctrl
protected

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

ilExtIdGUI::$form
protected

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

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

ilExtIdGUI::$ilAccess
protected

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

Referenced by __construct().

ilExtIdGUI::$lng
protected

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

Referenced by __construct().

ilExtIdGUI::$object
protected

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

ilExtIdGUI::$tabs_gui
protected

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

ilExtIdGUI::$toolbar
protected

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

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: