ILIAS  release_8 Revision v8.24
ilObjectCustomIconConfigurationGUI Class Reference
+ Collaboration diagram for ilObjectCustomIconConfigurationGUI:

Public Member Functions

 __construct (Container $dic, $parentGui, ilObject $object)
 
 setUploadFieldInformationText (?string $uploadFieldInformationText)
 
 executeCommand ()
 

Protected Member Functions

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

Protected Attributes

const DEFAULT_CMD = 'showForm'
 
Container $dic
 
ilObject $object
 
 $parentGui
 
string $uploadFieldInformationText = null
 
ilGlobalTemplateInterface $main_tpl
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

35 {
36 global $DIC;
37 $this->main_tpl = $DIC->ui()->mainTemplate();
38 $this->dic = $dic;
39 $this->parentGui = $parentGui;
40 $this->object = $object;
41 }
global $DIC
Definition: feed.php:28

References $DIC, $dic, $object, and $parentGui.

Member Function Documentation

◆ executeCommand()

ilObjectCustomIconConfigurationGUI::executeCommand ( )

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

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

◆ getForm()

ilObjectCustomIconConfigurationGUI::getForm ( )
protected

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

74 {
75 $this->dic->language()->loadLanguageModule('cntr');
76
77 $form = new ilPropertyFormGUI();
78 $form->setFormAction($this->dic->ctrl()->getFormAction($this, 'saveForm'));
79 $form->setTitle($this->dic->language()->txt('icon_settings'));
80
81 $this->addSettingsToForm($form);
82
83 $form->addCommandButton('saveForm', $this->dic->language()->txt('save'));
84
85 return $form;
86 }
This class represents a property form user interface.

Referenced by saveForm(), and showForm().

+ Here is the caller graph for this function:

◆ saveForm()

ilObjectCustomIconConfigurationGUI::saveForm ( )
protected

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

109 : void
110 {
111 $form = $this->getForm();
112 if ($form->checkInput()) {
113 $this->saveIcon($form);
114
115 $this->main_tpl->setOnScreenMessage('success', $this->dic->language()->txt('msg_obj_modified'), true);
116 $this->dic->ctrl()->redirect($this, 'showForm');
117 }
118
119 $form->setValuesByPost();
120 $this->showForm($form);
121 }

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

+ Here is the call graph for this function:

◆ setUploadFieldInformationText()

ilObjectCustomIconConfigurationGUI::setUploadFieldInformationText ( ?string  $uploadFieldInformationText)

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

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

References $uploadFieldInformationText.

◆ showForm()

ilObjectCustomIconConfigurationGUI::showForm ( ?ilPropertyFormGUI  $form = null)
protected

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

64 : void
65 {
66 if (null === $form) {
67 $form = $this->getForm();
68 }
69
70 $this->dic->ui()->mainTemplate()->setContent($form->getHTML());
71 }

References getForm().

Referenced by saveForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $dic

Container ilObjectCustomIconConfigurationGUI::$dic
protected

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

Referenced by __construct().

◆ $main_tpl

ilGlobalTemplateInterface ilObjectCustomIconConfigurationGUI::$main_tpl
protected

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

◆ $object

ilObject ilObjectCustomIconConfigurationGUI::$object
protected

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

Referenced by __construct().

◆ $parentGui

ilObjectCustomIconConfigurationGUI::$parentGui
protected

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

Referenced by __construct().

◆ $uploadFieldInformationText

string ilObjectCustomIconConfigurationGUI::$uploadFieldInformationText = null
protected

◆ DEFAULT_CMD

const ilObjectCustomIconConfigurationGUI::DEFAULT_CMD = 'showForm'
protected

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


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