ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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

 $object
 
 $ctrl
 
 $tpl
 
 $lng
 
 $object_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addCommonFieldsToForm()

ilIndividualAssessmentCommonSettingsGUI::addCommonFieldsToForm ( ilPropertyFormGUI  $form)
protected

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

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

Referenced by buildForm().

99  {
100  $section_appearance = new ilFormSectionHeaderGUI();
101  $section_appearance->setTitle($this->txt('cont_presentation'));
102  $form->addItem($section_appearance);
103  $form_service = $this->object_service->commonSettings()->legacyForm($form, $this->object);
104  $form = $form_service->addTitleIconVisibility();
105  $form = $form_service->addTopActionsVisibility();
106  $form = $form_service->addIcon();
107  $form = $form_service->addTileImage();
108  }
This class represents a section header in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addServiceSettingsToForm()

ilIndividualAssessmentCommonSettingsGUI::addServiceSettingsToForm ( ilPropertyFormGUI  $form)
protected

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

References ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\initServiceSettingsForm(), and ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS.

Referenced by buildForm().

87  {
89  $this->object->getId(),
90  $form,
91  [
94  ]
95  );
96  }
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildForm()

ilIndividualAssessmentCommonSettingsGUI::buildForm ( )
protected

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

References addCommonFieldsToForm(), addServiceSettingsToForm(), and txt().

Referenced by editSettings(), and saveSettings().

73  {
74  $form = new ilPropertyFormGUI();
75  $form->setFormAction($this->ctrl->getFormAction($this));
76  $form->setTitle($this->txt('obj_features'));
77  $form->addCommandButton(self::CMD_SAVE, $this->txt('save'));
78  $form->addCommandButton(self::CMD_EDIT, $this->txt('cancel'));
79 
80  $this->addServiceSettingsToForm($form);
81  $this->addCommonFieldsToForm($form);
82 
83  return $form;
84  }
This class represents a property form user interface.
+ 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 64 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

References buildForm().

Referenced by executeCommand(), and saveSettings().

65  {
66  if (is_null($form)) {
67  $form = $this->buildForm();
68  }
69  $this->tpl->setContent($form->getHTML());
70  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilIndividualAssessmentCommonSettingsGUI::executeCommand ( )

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

References editSettings(), and saveSettings().

50  {
51  $cmd = $this->ctrl->getCmd();
52  switch ($cmd) {
53  case self::CMD_EDIT:
54  $this->editSettings();
55  break;
56  case self::CMD_SAVE:
57  $this->saveSettings();
58  break;
59  default:
60  throw new Exception('Unknown command ' . $cmd);
61  }
62  }
+ Here is the call graph for this function:

◆ saveSettings()

ilIndividualAssessmentCommonSettingsGUI::saveSettings ( )
protected

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

References buildForm(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, editSettings(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

Referenced by executeCommand().

111  {
112  $form = $this->buildForm();
113 
114  if (!$form->checkInput()) {
115  $form->setValuesByPost();
116  $this->editSettings($form);
117  return;
118  }
119 
121  $this->object->getId(),
122  $form,
123  [
126  ]
127  );
128 
129  $form_service = $this->object_service->commonSettings()->legacyForm($form, $this->object);
130  $form_service->saveTitleIconVisibility();
131  $form_service->saveTopActionsVisibility();
132  $form_service->saveIcon();
133  $form_service->saveTileImage();
134 
135  ilUtil::sendSuccess($this->lng->txt('iass_settings_saved'), true);
136  $this->ctrl->redirect($this, self::CMD_EDIT);
137  }
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
+ 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 139 of file class.ilIndividualAssessmentCommonSettingsGUI.php.

Referenced by addCommonFieldsToForm(), and buildForm().

139  : string
140  {
141  return $this->lng->txt($code);
142  }
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilIndividualAssessmentCommonSettingsGUI::$ctrl
protected

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

Referenced by __construct().

◆ $lng

ilIndividualAssessmentCommonSettingsGUI::$lng
protected

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

Referenced by __construct().

◆ $object

ilIndividualAssessmentCommonSettingsGUI::$object
protected

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

Referenced by __construct().

◆ $object_service

ilIndividualAssessmentCommonSettingsGUI::$object_service
protected

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

Referenced by __construct().

◆ $tpl

ilIndividualAssessmentCommonSettingsGUI::$tpl
protected

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

Referenced by __construct().

◆ CMD_EDIT

const ilIndividualAssessmentCommonSettingsGUI::CMD_EDIT = 'editSettings'

◆ CMD_SAVE

const ilIndividualAssessmentCommonSettingsGUI::CMD_SAVE = 'saveSettings'

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