ILIAS  release_8 Revision v8.24
ilObjectServiceSettingsGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilObjectServiceSettingsGUI:

Public Member Functions

 __construct (ilObjectGUI $parent_gui, int $obj_id, array $modes)
 Constructor. More...
 
 executeCommand ()
 
 getModes ()
 Get active modes. More...
 
 getObjId ()
 Get obj id. More...
 

Static Public Member Functions

static initServiceSettingsForm (int $obj_id, ilPropertyFormGUI $form, array $services)
 
static updateServiceSettingsForm (int $obj_id, ilPropertyFormGUI $form, array $services)
 

Data Fields

const CALENDAR_CONFIGURATION = 'cont_cal_configuration'
 
const CALENDAR_VISIBILITY = 'cont_show_calendar'
 
const CALENDAR_ACTIVATION = 'cont_activation_calendar'
 
const NEWS_VISIBILITY = 'cont_show_news'
 
const USE_NEWS = 'cont_use_news'
 
const AUTO_RATING_NEW_OBJECTS = 'cont_auto_rate_new_obj'
 
const INFO_TAB_VISIBILITY = 'cont_show_info_tab'
 
const TAXONOMIES = 'cont_taxonomies'
 
const TAG_CLOUD = 'cont_tag_cloud'
 
const CUSTOM_METADATA = 'cont_custom_md'
 
const BADGES = 'cont_badges'
 
const ORGU_POSITION_ACCESS = 'obj_orgunit_positions'
 
const SKILLS = 'cont_skills'
 
const FILTER = 'filter'
 
const BOOKING = 'cont_bookings'
 
const EXTERNAL_MAIL_PREFIX = 'mail_external_prefix'
 

Protected Member Functions

 cancel ()
 
 editSettings (ilPropertyFormGUI $form=null)
 Edit tool settings (calendar, news, comments, ...) More...
 
 updateToolSettings ()
 Update settings. More...
 
 isModeActive (string $mode)
 Check if specific mode is active. More...
 

Protected Attributes

ilCtrl $ctrl
 
ilGlobalTemplateInterface $main_tpl
 
ilLanguage $lng
 
ilObjectGUI $gui = null
 
array $modes = []
 
int $obj_id = 0
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning GUI class for service settings (calendar, notes, comments)

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjectServiceSettingsGUI:

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

Constructor & Destructor Documentation

◆ __construct()

ilObjectServiceSettingsGUI::__construct ( ilObjectGUI  $parent_gui,
int  $obj_id,
array  $modes 
)

Constructor.

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

67 {
68 global $DIC;
69 $this->main_tpl = $DIC->ui()->mainTemplate();
70 $this->ctrl = $DIC->ctrl();
71 $this->lng = $DIC["lng"];
72
73 $this->gui = $parent_gui;
74 $this->modes = $DIC->refinery()->to()->listOf(
75 $DIC->refinery()->kindlyTo()->string()
76 )->transform($modes);
77
78 $this->obj_id = $obj_id;
79 }
global $DIC
Definition: feed.php:28

References $DIC, $modes, $obj_id, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ cancel()

ilObjectServiceSettingsGUI::cancel ( )
protected

Definition at line 464 of file class.ilObjectServiceSettingsGUI.php.

464 : void
465 {
466 $this->ctrl->returnToParent($this);
467 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ editSettings()

ilObjectServiceSettingsGUI::editSettings ( ilPropertyFormGUI  $form = null)
protected

Edit tool settings (calendar, news, comments, ...)

Parameters
ilPropertyFormGUI$form

Definition at line 473 of file class.ilObjectServiceSettingsGUI.php.

473 : void
474 {
475 if (!$form instanceof ilPropertyFormGUI) {
476 // TODO: cant find initSettingsForm, is editSettings ever called?
477 $form = $this->initSettingsForm();
478 }
479 $this->main_tpl->setContent($form->getHTML());
480 }
This class represents a property form user interface.

References ilPropertyFormGUI\getHTML().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjectServiceSettingsGUI::executeCommand ( )

Definition at line 81 of file class.ilObjectServiceSettingsGUI.php.

81 : void
82 {
83 $this->ctrl->getNextClass($this);
84 $cmd = $this->ctrl->getCmd('editSettings');
85 $this->$cmd();
86 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getModes()

ilObjectServiceSettingsGUI::getModes ( )

Get active modes.

Returns
string[]

Definition at line 451 of file class.ilObjectServiceSettingsGUI.php.

451 : array
452 {
453 return $this->modes;
454 }

◆ getObjId()

ilObjectServiceSettingsGUI::getObjId ( )

Get obj id.

Definition at line 459 of file class.ilObjectServiceSettingsGUI.php.

459 : int
460 {
461 return $this->obj_id;
462 }

◆ initServiceSettingsForm()

static ilObjectServiceSettingsGUI::initServiceSettingsForm ( int  $obj_id,
ilPropertyFormGUI  $form,
array  $services 
)
static

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

93 global $DIC;
94
95 $ilSetting = $DIC->settings();
96 $ilCtrl = $DIC->ctrl();
97 $lng = $DIC->language();
98
100
101 // info tab
102 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
103 $info = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_info_tab'), self::INFO_TAB_VISIBILITY);
104 $info->setValue("1");
105 $info->setChecked((bool) ilContainer::_lookupContainerSetting(
106 $obj_id,
107 self::INFO_TAB_VISIBILITY
108 ));
109 //$info->setOptionTitle($lng->txt('obj_tool_setting_info_tab'));
110 $info->setInfo($lng->txt('obj_tool_setting_info_tab_info'));
111 $form->addItem($info);
112 }
113
114 // calendar
115 if (in_array(self::CALENDAR_CONFIGURATION, $services)) {
117 if ($settings->isEnabled()) {
118 $active = new ilCheckboxInputGUI(
119 $lng->txt('obj_tool_setting_calendar_active'),
120 self::CALENDAR_ACTIVATION
121 );
122 $active->setValue("1");
124 $active->setInfo($lng->txt('obj_tool_setting_calendar_active_info'));
125
126 $visible = new ilCheckboxInputGUI(
127 $lng->txt('obj_tool_setting_calendar'),
128 self::CALENDAR_VISIBILITY
129 );
130 $visible->setValue("1");
132 $visible->setInfo($lng->txt('obj_tool_setting_calendar_info'));
133 $active->addSubItem($visible);
134
135 $form->addItem($active);
136 }
137 }
138
139 // news
140 if (in_array(self::USE_NEWS, $services)) {
141 $news = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_use_news'), self::USE_NEWS);
142 $news->setValue("1");
143 $checked = (bool) ilContainer::_lookupContainerSetting(
144 $obj_id,
145 self::USE_NEWS
146 );
147 $news->setChecked($checked);
148 $info = $lng->txt('obj_tool_setting_use_news_info');
149 if ($checked) {
150 $info .= " <a href='" . $ilCtrl->getLinkTargetByClass("ilcontainernewssettingsgui", "") .
151 "'>ยป " . $lng->txt('obj_tool_setting_use_news_open_settings') . "</a>";
152 }
153 $news->setInfo($info);
154 $form->addItem($news);
155 }
156 if (in_array(self::NEWS_VISIBILITY, $services)) {
157 if ($ilSetting->get('block_activated_news')) {
158 // Container tools (calendar, news, ... activation)
159 $news = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_news'), self::NEWS_VISIBILITY);
160 $news->setValue("1");
161 $news->setChecked((bool) ilContainer::_lookupContainerSetting(
162 $obj_id,
163 self::NEWS_VISIBILITY,
164 $ilSetting->get('block_activated_news')
165 ));
166 //$news->setOptionTitle($lng->txt('obj_tool_setting_news'));
167 $news->setInfo($lng->txt('obj_tool_setting_news_info'));
168 $form->addItem($news);
169
170 if (in_array(ilObject::_lookupType($obj_id), array('crs', 'grp'))) {
172 $ref_id = array_pop($refs);
173
175 }
176 }
177 }
178
179 // (local) custom metadata
180 if (in_array(self::CUSTOM_METADATA, $services)) {
181 $md = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_custom_metadata'), self::CUSTOM_METADATA);
182 $md->setInfo($lng->txt('obj_tool_setting_custom_metadata_info'));
183 $md->setValue("1");
184 $md->setChecked((bool) ilContainer::_lookupContainerSetting(
185 $obj_id,
186 self::CUSTOM_METADATA
187 ));
188 $form->addItem($md);
189 }
190
191 // tag cloud
192 if (in_array(self::TAG_CLOUD, $services)) {
193 $tags_active = new ilSetting("tags");
194 if ($tags_active->get("enable")) {
195 $tag = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_tag_cloud'), self::TAG_CLOUD);
196 $tag->setInfo($lng->txt('obj_tool_setting_tag_cloud_info'));
197 $tag->setValue("1");
198 $tag->setChecked((bool) ilContainer::_lookupContainerSetting(
199 $obj_id,
200 self::TAG_CLOUD
201 ));
202 $form->addItem($tag);
203 }
204 }
205
206 // taxonomies
207 if (in_array(self::TAXONOMIES, $services)) {
208 $tax = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_taxonomies'), self::TAXONOMIES);
209 $tax->setInfo($lng->txt('obj_tool_setting_taxonomies_info'));
210 $tax->setValue("1");
211 $tax->setChecked((bool) ilContainer::_lookupContainerSetting(
212 $obj_id,
213 self::TAXONOMIES
214 ));
215 $form->addItem($tax);
216 }
217
218 // auto rating
219 if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
220 $lng->loadLanguageModule("rating");
221
222 // auto rating for new objects
223 $rate = new ilCheckboxInputGUI($lng->txt('rating_new_objects_auto'), self::AUTO_RATING_NEW_OBJECTS);
224 $rate->setValue("1");
225 //$rate->setOptionTitle($lng->txt('rating_new_objects_auto'));
226 $rate->setInfo($lng->txt('rating_new_objects_auto_info'));
227 $rate->setChecked((bool) ilContainer::_lookupContainerSetting(
228 $obj_id,
229 self::AUTO_RATING_NEW_OBJECTS
230 ));
231 $form->addItem($rate);
232 }
233
234 // badges
235 if (in_array(self::BADGES, $services)) {
236 if (ilBadgeHandler::getInstance()->isActive()) {
237 $bdg = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_badges'), self::BADGES);
238 $bdg->setInfo($lng->txt('obj_tool_setting_badges_info'));
239 $bdg->setValue("1");
240 $bdg->setChecked((bool) ilContainer::_lookupContainerSetting(
241 $obj_id,
242 self::BADGES
243 ));
244 $form->addItem($bdg);
245 }
246 }
247 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
248 $position_settings = ilOrgUnitGlobalSettings::getInstance()->getObjectPositionSettingsByType(
250 );
251 if (
252 $position_settings->isActive()
253 ) {
254 $lia = new ilCheckboxInputGUI(
255 $GLOBALS['DIC']->language()->txt('obj_orgunit_positions'),
256 self::ORGU_POSITION_ACCESS
257 );
258 $lia->setInfo($GLOBALS['DIC']->language()->txt('obj_orgunit_positions_info'));
259 $lia->setValue("1");
260 $lia->setChecked(
261 ilOrgUnitGlobalSettings::getInstance()->isPositionAccessActiveForObject($obj_id)
262 );
263 if (!$position_settings->isChangeableForObject()) {
264 $lia->setDisabled(true);
265 }
266 $form->addItem($lia);
267 }
268 }
269
270 // skills
271 if (in_array(self::SKILLS, $services)) {
272 $skmg_set = new ilSetting("skmg");
273 if ($skmg_set->get("enable_skmg")) {
274 $skill = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_skills'), self::SKILLS);
275 $skill->setInfo($lng->txt('obj_tool_setting_skills_info'));
276 $skill->setValue("1");
277 $skill->setChecked((bool) ilContainer::_lookupContainerSetting(
278 $obj_id,
279 self::SKILLS
280 ));
281 $form->addItem($skill);
282 }
283 }
284
285 // filter
286 if (in_array(self::FILTER, $services)) {
287 $filter = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_filter'), self::FILTER);
288 $filter->setInfo($lng->txt('obj_tool_setting_filter_info'));
289 $filter->setValue("1");
290 $filter->setChecked((bool) ilContainer::_lookupContainerSetting(
291 $obj_id,
292 self::FILTER
293 ));
294 $form->addItem($filter);
295
296 $filter_show_empty = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_filter_empty'), "filter_show_empty");
297 $filter_show_empty->setInfo($lng->txt('obj_tool_setting_filter_empty_info'));
298 $filter_show_empty->setValue("1");
299 $filter_show_empty->setChecked((bool) ilContainer::_lookupContainerSetting(
300 $obj_id,
301 "filter_show_empty"
302 ));
303 $filter->addSubItem($filter_show_empty);
304 }
305 // booking tool
306 if (in_array(self::BOOKING, $services)) {
307 $book = new ilCheckboxInputGUI($lng->txt('obj_tool_booking'), self::BOOKING);
308 $book->setInfo($lng->txt('obj_tool_booking_info'));
309 $book->setValue("1");
310 $book->setChecked((bool) ilContainer::_lookupContainerSetting(
311 $obj_id,
312 self::BOOKING
313 ));
314 $form->addItem($book);
315 }
316
317 if (in_array(self::EXTERNAL_MAIL_PREFIX, $services)) {
318 $externalMailPrefix = new ilTextInputGUI($lng->txt('obj_tool_ext_mail_subject_prefix'), self::EXTERNAL_MAIL_PREFIX);
319 $externalMailPrefix->setMaxLength(255);
320 $externalMailPrefix->setInfo($lng->txt('obj_tool_ext_mail_subject_prefix_info'));
321 $externalMailPrefix->setValue(ilContainer::_lookupContainerSetting($obj_id, self::EXTERNAL_MAIL_PREFIX, ''));
322 $form->addItem($externalMailPrefix);
323 }
324
325 return $form;
326 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static lookupCalendarContentPresentationEnabled(int $obj_id)
static lookupCalendarActivated(int $a_obj_id)
This class represents a checkbox property in a property form.
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static addToSettingsForm(int $a_ref_id, ?ilPropertyFormGUI $a_form=null, ?ilFormPropertyGUI $a_input=null)
Add notification settings to form.
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text property in a property form.
$ref_id
Definition: ltiauth.php:67
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
global $ilSetting
Definition: privfeed.php:17

References $lng, $obj_id, ilContainer\_lookupContainerSetting(), ilPropertyFormGUI\addItem(), and ilLanguage\txt().

Referenced by ilObjBookingPoolGUI\addExternalEditFormCustom(), ilIndividualAssessmentCommonSettingsGUI\addServiceSettingsToForm(), ilStudyProgrammeCommonSettingsGUI\addServiceSettingsToForm(), ilObjTestSettingsGeneralGUI\buildForm(), ilObjContentPageGUI\initEditCustomForm(), ilObjMediaPoolGUI\initEditCustomForm(), ilObjPortfolioTemplateGUI\initEditCustomForm(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilObjSessionGUI\initForm(), ilObjGroupGUI\initForm(), ilObjContentObjectGUI\initPropertiesForm(), ilObjFileBasedLMGUI\initSettingsForm(), and ilObjWikiGUI\initSettingsForm().

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

◆ isModeActive()

ilObjectServiceSettingsGUI::isModeActive ( string  $mode)
protected

Check if specific mode is active.

Definition at line 508 of file class.ilObjectServiceSettingsGUI.php.

508 : bool
509 {
510 return in_array($mode, $this->getModes(), true);
511 }

◆ updateServiceSettingsForm()

static ilObjectServiceSettingsGUI::updateServiceSettingsForm ( int  $obj_id,
ilPropertyFormGUI  $form,
array  $services 
)
static
Parameters
string[]$services

Definition at line 331 of file class.ilObjectServiceSettingsGUI.php.

331 : bool
332 {
333 // info
334 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
336 $obj_id,
337 self::INFO_TAB_VISIBILITY,
338 $form->getInput(self::INFO_TAB_VISIBILITY)
339 );
340 }
341
342 // calendar
343 if (in_array(self::CALENDAR_CONFIGURATION, $services)) {
344 if (ilCalendarSettings::_getInstance()->isEnabled()) {
345 $active = $form->getInput(self::CALENDAR_ACTIVATION);
346 $visible = $form->getInput(self::CALENDAR_VISIBILITY);
348 $obj_id,
349 self::CALENDAR_ACTIVATION,
350 $active
351 );
353 $obj_id,
354 self::CALENDAR_VISIBILITY,
355 $active ? $visible : ""
356 );
357 }
358 }
359 // news
360 if (in_array(self::USE_NEWS, $services)) {
361 ilContainer::_writeContainerSetting($obj_id, self::USE_NEWS, $form->getInput(self::USE_NEWS));
362 }
363 if (in_array(self::NEWS_VISIBILITY, $services)) {
364 ilContainer::_writeContainerSetting($obj_id, self::NEWS_VISIBILITY, $form->getInput(self::NEWS_VISIBILITY));
365
366 if (in_array(ilObject::_lookupType($obj_id), array('crs', 'grp'))) {
368 $ref_id = array_pop($refs);
369
371 }
372 }
373
374 // rating
375 if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
377 $obj_id,
378 self::AUTO_RATING_NEW_OBJECTS,
379 $form->getInput(self::AUTO_RATING_NEW_OBJECTS)
380 );
381 }
382
383 // taxonomies
384 if (in_array(self::TAXONOMIES, $services)) {
385 ilContainer::_writeContainerSetting($obj_id, self::TAXONOMIES, $form->getInput(self::TAXONOMIES));
386 }
387
388 // tag cloud
389 if (in_array(self::TAG_CLOUD, $services)) {
390 ilContainer::_writeContainerSetting($obj_id, self::TAG_CLOUD, $form->getInput(self::TAG_CLOUD));
391 }
392
393 // (local) custom metadata
394 if (in_array(self::CUSTOM_METADATA, $services)) {
395 ilContainer::_writeContainerSetting($obj_id, self::CUSTOM_METADATA, $form->getInput(self::CUSTOM_METADATA));
396 }
397
398 // badges
399 if (in_array(self::BADGES, $services)) {
400 if (ilBadgeHandler::getInstance()->isActive()) {
401 ilContainer::_writeContainerSetting($obj_id, self::BADGES, $form->getInput(self::BADGES));
402 }
403 }
404
405 // booking
406 if (in_array(self::BOOKING, $services)) {
407 ilContainer::_writeContainerSetting($obj_id, self::BOOKING, $form->getInput(self::BOOKING));
408 }
409
410 // extended user access
411 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
412 $position_settings = ilOrgUnitGlobalSettings::getInstance()->getObjectPositionSettingsByType(
414 );
415
416 if ($position_settings->isActive() && $position_settings->isChangeableForObject()) {
417 $orgu_object_settings = new ilOrgUnitObjectPositionSetting($obj_id);
418 $orgu_object_settings->setActive(
419 (bool) $form->getInput(self::ORGU_POSITION_ACCESS)
420 );
421 $orgu_object_settings->update();
422 }
423 }
424
425 // skills
426 if (in_array(self::SKILLS, $services)) {
427 $skmg_set = new ilSetting("skmg");
428 if ($skmg_set->get("enable_skmg")) {
429 ilContainer::_writeContainerSetting($obj_id, self::SKILLS, $form->getInput(self::SKILLS));
430 }
431 }
432
433 // filter
434 if (in_array(self::FILTER, $services)) {
435 ilContainer::_writeContainerSetting($obj_id, self::FILTER, $form->getInput(self::FILTER));
436 ilContainer::_writeContainerSetting($obj_id, "filter_show_empty", $form->getInput("filter_show_empty"));
437 }
438
439 if (in_array(self::EXTERNAL_MAIL_PREFIX, $services)) {
440 ilContainer::_writeContainerSetting($obj_id, self::EXTERNAL_MAIL_PREFIX, $form->getInput(self::EXTERNAL_MAIL_PREFIX));
441 }
442
443 return true;
444 }
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static importFromForm(int $a_ref_id, ?ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References $ref_id, ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilObject\_lookupType(), ilContainer\_writeContainerSetting(), ilPropertyFormGUI\getInput(), ilOrgUnitGlobalSettings\getInstance(), ilBadgeHandler\getInstance(), and ilMembershipNotifications\importFromForm().

Referenced by ilObjTestSettingsGeneralGUI\performSaveForm(), ilObjSessionGUI\saveObject(), ilObjGlossaryGUI\saveProperties(), ilObjFileBasedLMGUI\saveProperties(), ilObjContentObjectGUI\saveProperties(), ilIndividualAssessmentCommonSettingsGUI\saveSettings(), ilStudyProgrammeCommonSettingsGUI\saveSettings(), ilObjWikiGUI\saveSettingsObject(), ilObjExerciseGUI\updateCustom(), ilObjBookingPoolGUI\updateCustom(), ilObjContentPageGUI\updateCustom(), ilObjMediaPoolGUI\updateCustom(), ilObjPortfolioTemplateGUI\updateCustom(), ilObjCategoryGUI\updateObject(), ilObjCourseGUI\updateObject(), ilObjGroupGUI\updateObject(), and ilObjSessionGUI\updateObject().

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

◆ updateToolSettings()

ilObjectServiceSettingsGUI::updateToolSettings ( )
protected

Update settings.

Definition at line 486 of file class.ilObjectServiceSettingsGUI.php.

486 : void
487 {
488 // TODO: cant find initSettingsForm, is updateToolSettings ever called?
489 $form = $this->initSettingsForm();
490 if ($form->checkInput()) {
491 if (ilCalendarSettings::_getInstance()->isEnabled()) {
492 if ($this->isModeActive(self::CALENDAR_VISIBILITY)) {
493 ilContainer::_writeContainerSetting($this->getObjId(), 'show_calendar', $form->getInput('calendar'));
494 }
495 }
496 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
497 $this->ctrl->redirect($this);
498 }
499
500 $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
501 $form->setValuesByPost();
502 $this->editSettings($form);
503 }
isModeActive(string $mode)
Check if specific mode is active.
editSettings(ilPropertyFormGUI $form=null)
Edit tool settings (calendar, news, comments, ...)

References ilCalendarSettings\_getInstance(), ilContainer\_writeContainerSetting(), ilPropertyFormGUI\checkInput(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getInput(), ILIAS\Repository\lng(), and ilPropertyFormGUI\setValuesByPost().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilObjectServiceSettingsGUI::$ctrl
protected

Definition at line 55 of file class.ilObjectServiceSettingsGUI.php.

◆ $gui

ilObjectGUI ilObjectServiceSettingsGUI::$gui = null
protected

Definition at line 59 of file class.ilObjectServiceSettingsGUI.php.

◆ $lng

ilLanguage ilObjectServiceSettingsGUI::$lng
protected

Definition at line 57 of file class.ilObjectServiceSettingsGUI.php.

Referenced by initServiceSettingsForm().

◆ $main_tpl

ilGlobalTemplateInterface ilObjectServiceSettingsGUI::$main_tpl
protected

Definition at line 56 of file class.ilObjectServiceSettingsGUI.php.

◆ $modes

array ilObjectServiceSettingsGUI::$modes = []
protected

Definition at line 60 of file class.ilObjectServiceSettingsGUI.php.

Referenced by __construct().

◆ $obj_id

int ilObjectServiceSettingsGUI::$obj_id = 0
protected

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

Referenced by __construct(), and initServiceSettingsForm().

◆ AUTO_RATING_NEW_OBJECTS

const ilObjectServiceSettingsGUI::AUTO_RATING_NEW_OBJECTS = 'cont_auto_rate_new_obj'

◆ BADGES

const ilObjectServiceSettingsGUI::BADGES = 'cont_badges'

◆ BOOKING

const ilObjectServiceSettingsGUI::BOOKING = 'cont_bookings'

◆ CALENDAR_ACTIVATION

const ilObjectServiceSettingsGUI::CALENDAR_ACTIVATION = 'cont_activation_calendar'

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

◆ CALENDAR_CONFIGURATION

const ilObjectServiceSettingsGUI::CALENDAR_CONFIGURATION = 'cont_cal_configuration'

◆ CALENDAR_VISIBILITY

const ilObjectServiceSettingsGUI::CALENDAR_VISIBILITY = 'cont_show_calendar'

Definition at line 38 of file class.ilObjectServiceSettingsGUI.php.

◆ CUSTOM_METADATA

◆ EXTERNAL_MAIL_PREFIX

◆ FILTER

const ilObjectServiceSettingsGUI::FILTER = 'filter'

◆ INFO_TAB_VISIBILITY

◆ NEWS_VISIBILITY

◆ ORGU_POSITION_ACCESS

◆ SKILLS

const ilObjectServiceSettingsGUI::SKILLS = 'cont_skills'

◆ TAG_CLOUD

const ilObjectServiceSettingsGUI::TAG_CLOUD = 'cont_tag_cloud'

◆ TAXONOMIES

◆ USE_NEWS

const ilObjectServiceSettingsGUI::USE_NEWS = 'cont_use_news'

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