ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjectCustomIconConfigurationGUI Class Reference

Class ilObjectCustomIconConfigurationGUI. More...

+ Collaboration diagram for ilObjectCustomIconConfigurationGUI:

Public Member Functions

 __construct (\ILIAS\DI\Container $dic, $parentGui, \ilObject $object)
 ilObjectCustomIconConfigurationGUI constructor. More...
 
 setUploadFieldInformationText ($uploadFieldInformationText)
 
 executeCommand ()
 

Data Fields

const DEFAULT_CMD = 'showForm'
 

Protected Member Functions

 showForm (\ilPropertyFormGUI $form=null)
 
 getForm ()
 
 saveForm ()
 

Protected Attributes

 $dic
 
 $object
 
 $parentGui
 
 $uploadFieldInformationText = null
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjectCustomIconConfigurationGUI::__construct ( \ILIAS\DI\Container  $dic,
  $parentGui,
\ilObject  $object 
)

ilObjectCustomIconConfigurationGUI constructor.

Parameters
\ILIAS\DI\Container$dic
\ilObjectGUI | mixed$parentGui
ilObject$object

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

References $dic, $object, and $parentGui.

Member Function Documentation

◆ executeCommand()

ilObjectCustomIconConfigurationGUI::executeCommand ( )

Definition at line 47 of file class.ilObjectCustomIconConfigurationGUI.php.

48  {
49  $nextClass = $this->dic->ctrl()->getNextClass($this);
50  $cmd = $this->dic->ctrl()->getCmd(self::DEFAULT_CMD);
51 
52  switch (true) {
53  case method_exists($this, $cmd):
54  $this->{$cmd}();
55  break;
56 
57  default:
58  $this->{self::DEFAULT_CMD}();
59  break;
60  }
61  }

◆ getForm()

ilObjectCustomIconConfigurationGUI::getForm ( )
protected
Returns

Definition at line 78 of file class.ilObjectCustomIconConfigurationGUI.php.

References $form, and ilPropertyFormGUI\addItem().

Referenced by saveForm(), and showForm().

79  {
80  $this->dic->language()->loadLanguageModule('cntr');
81 
82  $form = new \ilPropertyFormGUI();
83  $form->setFormAction($this->dic->ctrl()->getFormAction($this, 'saveForm'));
84  $form->setTitle($this->dic->language()->txt('icon_settings'));
85 
86  $this->addSettingsToForm($form);
87 
88  $form->addCommandButton('saveForm', $this->dic->language()->txt('save'));
89 
90  return $form;
91  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveForm()

ilObjectCustomIconConfigurationGUI::saveForm ( )
protected

Definition at line 121 of file class.ilObjectCustomIconConfigurationGUI.php.

References ilPropertyFormGUI\checkInput(), getForm(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), ilPropertyFormGUI\setValuesByPost(), and showForm().

122  {
123  $form = $this->getForm();
124  if ($form->checkInput()) {
125  $this->saveIcon($form);
126 
127  ilUtil::sendSuccess($this->dic->language()->txt('msg_obj_modified'), true);
128  $this->dic->ctrl()->redirect($this, 'showForm');
129  }
130 
131  $form->setValuesByPost();
132  $this->showForm($form);
133  }
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ setUploadFieldInformationText()

ilObjectCustomIconConfigurationGUI::setUploadFieldInformationText (   $uploadFieldInformationText)
Parameters
null | string$uploadFieldInformationText

Definition at line 42 of file class.ilObjectCustomIconConfigurationGUI.php.

References $uploadFieldInformationText.

43  {
44  $this->uploadFieldInformationText = $uploadFieldInformationText;
45  }

◆ showForm()

ilObjectCustomIconConfigurationGUI::showForm ( \ilPropertyFormGUI  $form = null)
protected
Parameters
ilPropertyFormGUI | null$form

Definition at line 66 of file class.ilObjectCustomIconConfigurationGUI.php.

References $form, and getForm().

Referenced by saveForm().

67  {
68  if (!$form) {
69  $form = $this->getForm();
70  }
71 
72  $this->dic->ui()->mainTemplate()->setContent($form->getHTML());
73  }
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $dic

ilObjectCustomIconConfigurationGUI::$dic
protected

Definition at line 13 of file class.ilObjectCustomIconConfigurationGUI.php.

Referenced by __construct().

◆ $object

ilObjectCustomIconConfigurationGUI::$object
protected

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

Referenced by __construct().

◆ $parentGui

ilObjectCustomIconConfigurationGUI::$parentGui
protected

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

Referenced by __construct().

◆ $uploadFieldInformationText

ilObjectCustomIconConfigurationGUI::$uploadFieldInformationText = null
protected

◆ DEFAULT_CMD

const ilObjectCustomIconConfigurationGUI::DEFAULT_CMD = 'showForm'

Definition at line 10 of file class.ilObjectCustomIconConfigurationGUI.php.


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