ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilIndividualAssessmentCommonSettingsGUI Class Reference
+ Collaboration diagram for ilIndividualAssessmentCommonSettingsGUI:

Public Member Functions

 __construct (ilObjIndividualAssessment $object, ilCtrl $ctrl, ilGlobalTemplateInterface $tpl, ilLanguage $lng, ilObjectService $object_service)
 
 executeCommand ()
 

Data Fields

const CMD_EDIT = 'editSettings'
 
const CMD_SAVE = 'saveSettings'
 

Protected Member Functions

 editSettings (?ilPropertyFormGUI $form=null)
 
 buildForm ()
 
 addServiceSettingsToForm (ilPropertyFormGUI $form)
 
 addCommonFieldsToForm (ilPropertyFormGUI $form)
 
 saveSettings ()
 
 txt (string $code)
 

Protected Attributes

ilObjIndividualAssessment $object
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilObjectService $object_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addCommonFieldsToForm()

ilIndividualAssessmentCommonSettingsGUI::addCommonFieldsToForm ( ilPropertyFormGUI  $form)
protected

Definition at line 95 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

95 : void
96 {
97 $section_appearance = new ilFormSectionHeaderGUI();
98 $section_appearance->setTitle($this->txt('cont_presentation'));
99 $form->addItem($section_appearance);
100 $form_service = $this->object_service->commonSettings()->legacyForm($form, $this->object);
101 $form_service->addTileImage();
102 }
This class represents a section header in a property form.

References ilPropertyFormGUI\addItem(), and txt().

Referenced by buildForm().

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

◆ addServiceSettingsToForm()

ilIndividualAssessmentCommonSettingsGUI::addServiceSettingsToForm ( ilPropertyFormGUI  $form)
protected

◆ buildForm()

ilIndividualAssessmentCommonSettingsGUI::buildForm ( )
protected

Definition at line 69 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

70 {
71 $form = new ilPropertyFormGUI();
72 $form->setFormAction($this->ctrl->getFormAction($this));
73 $form->setTitle($this->txt('obj_features'));
74 $form->addCommandButton(self::CMD_SAVE, $this->txt('save'));
75 $form->addCommandButton(self::CMD_EDIT, $this->txt('cancel'));
76
77 $this->addServiceSettingsToForm($form);
78 $this->addCommonFieldsToForm($form);
79
80 return $form;
81 }
This class represents a property form user interface.

References addCommonFieldsToForm(), addServiceSettingsToForm(), ILIAS\Repository\ctrl(), and txt().

Referenced by editSettings(), and saveSettings().

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

◆ editSettings()

ilIndividualAssessmentCommonSettingsGUI::editSettings ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 61 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

61 : void
62 {
63 if (is_null($form)) {
64 $form = $this->buildForm();
65 }
66 $this->tpl->setContent($form->getHTML());
67 }

References buildForm().

Referenced by executeCommand(), and saveSettings().

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

◆ executeCommand()

ilIndividualAssessmentCommonSettingsGUI::executeCommand ( )

Definition at line 46 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

46 : void
47 {
48 $cmd = $this->ctrl->getCmd();
49 switch ($cmd) {
50 case self::CMD_EDIT:
51 $this->editSettings();
52 break;
53 case self::CMD_SAVE:
54 $this->saveSettings();
55 break;
56 default:
57 throw new Exception('Unknown command ' . $cmd);
58 }
59 }

References CMD_EDIT, CMD_SAVE, ILIAS\Repository\ctrl(), editSettings(), and saveSettings().

+ Here is the call graph for this function:

◆ saveSettings()

ilIndividualAssessmentCommonSettingsGUI::saveSettings ( )
protected

Definition at line 104 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

104 : void
105 {
106 $form = $this->buildForm();
107
108 if (!$form->checkInput()) {
109 $form->setValuesByPost();
110 $this->editSettings($form);
111 return;
112 }
113
115 $this->object->getId(),
116 $form,
117 [
120 ]
121 );
122
123 $form_service = $this->object_service->commonSettings()->legacyForm($form, $this->object);
124 $form_service->saveTileImage();
125
126 $this->tpl->setOnScreenMessage("success", $this->lng->txt('iass_settings_saved'), true);
127 $this->ctrl->redirect($this, self::CMD_EDIT);
128 }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

References buildForm(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, editSettings(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

Referenced by executeCommand().

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

◆ txt()

ilIndividualAssessmentCommonSettingsGUI::txt ( string  $code)
protected

Definition at line 130 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

130 : string
131 {
132 return $this->lng->txt($code);
133 }

References ILIAS\Repository\lng().

Referenced by addCommonFieldsToForm(), and buildForm().

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

Field Documentation

◆ $ctrl

ilCtrl ilIndividualAssessmentCommonSettingsGUI::$ctrl
protected

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

Referenced by __construct().

◆ $lng

ilLanguage ilIndividualAssessmentCommonSettingsGUI::$lng
protected

Definition at line 29 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

Referenced by __construct().

◆ $object

ilObjIndividualAssessment ilIndividualAssessmentCommonSettingsGUI::$object
protected

Definition at line 26 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

Referenced by __construct().

◆ $object_service

ilObjectService ilIndividualAssessmentCommonSettingsGUI::$object_service
protected

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

Referenced by __construct().

◆ $tpl

ilGlobalTemplateInterface ilIndividualAssessmentCommonSettingsGUI::$tpl
protected

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

Referenced by __construct().

◆ CMD_EDIT

const ilIndividualAssessmentCommonSettingsGUI::CMD_EDIT = 'editSettings'

◆ CMD_SAVE

const ilIndividualAssessmentCommonSettingsGUI::CMD_SAVE = 'saveSettings'

Definition at line 24 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

Referenced by executeCommand().


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