ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjectServiceSettingsGUI Class Reference

GUI class for service settings (calendar, notes, comments) More...

+ Collaboration diagram for ilObjectServiceSettingsGUI:

Public Member Functions

 __construct ($a_parent_gui, $a_obj_id, $a_modes)
 Constructor. More...
 
 executeCommand ()
 Control class handling. More...
 
 getModes ()
 Get active modes. More...
 
 getObjId ()
 Get obj id. More...
 

Static Public Member Functions

static initServiceSettingsForm ($a_obj_id, ilPropertyFormGUI $form, $services)
 Init service settings form. More...
 
static updateServiceSettingsForm ($a_obj_id, ilPropertyFormGUI $form, $services)
 Update service settings. More...
 

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 ($a_mode)
 Check if specific mode is active. More...
 

Protected Attributes

 $ctrl
 

Private Attributes

 $gui = null
 
 $modes = array()
 
 $obj_id = 0
 

Detailed Description

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 14 of file class.ilObjectServiceSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjectServiceSettingsGUI::__construct (   $a_parent_gui,
  $a_obj_id,
  $a_modes 
)

Constructor.

Parameters
type$a_parent_gui

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

53 {
54 global $DIC;
55
56 $this->ctrl = $DIC->ctrl();
57 $this->gui = $a_parent_gui;
58 $this->modes = $a_modes;
59 $this->obj_id = $a_obj_id;
60 }
global $DIC
Definition: goto.php:24

References $DIC.

Member Function Documentation

◆ cancel()

ilObjectServiceSettingsGUI::cancel ( )
protected

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

484 {
485 $ilCtrl = $this->ctrl;
486 $ilCtrl->returnToParent($this);
487 }

References $ctrl.

◆ editSettings()

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

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

Parameters
ilPropertyFormGUI$form

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

494 {
495 global $DIC;
496
497 $tpl = $DIC->ui()->mainTemplate();
498
499 if (!$form instanceof ilPropertyFormGUI) {
500 $form = $this->initSettingsForm();
501 }
502 $tpl->setContent($form->getHTML());
503 }
This class represents a property form user interface.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

References $DIC, and $tpl.

Referenced by updateToolSettings().

+ Here is the caller graph for this function:

◆ executeCommand()

ilObjectServiceSettingsGUI::executeCommand ( )

Control class handling.

Returns

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

69 {
70 $ilCtrl = $this->ctrl;
71
72 $next_class = $ilCtrl->getNextClass($this);
73 $cmd = $ilCtrl->getCmd('editSettings');
74
75 switch ($next_class) {
76 default:
77 $this->$cmd();
78 break;
79 }
80 }

References $ctrl.

◆ getModes()

ilObjectServiceSettingsGUI::getModes ( )

Get active modes.

Returns
bool

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

References $modes.

Referenced by isModeActive().

+ Here is the caller graph for this function:

◆ getObjId()

ilObjectServiceSettingsGUI::getObjId ( )

Get obj id.

Returns
type

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

References $obj_id.

Referenced by updateToolSettings().

+ Here is the caller graph for this function:

◆ initServiceSettingsForm()

static ilObjectServiceSettingsGUI::initServiceSettingsForm (   $a_obj_id,
ilPropertyFormGUI  $form,
  $services 
)
static

Init service settings form.

Parameters
ilPropertyFormGUI$form
type$services

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

88 {
89 global $DIC;
90
91 $ilSetting = $DIC->settings();
92 $ilCtrl = $DIC->ctrl();
93 $lng = $DIC->language();
94
95 $lng->loadLanguageModule("obj");
96
97 // info tab
98 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
99 $info = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_info_tab'), self::INFO_TAB_VISIBILITY);
100 $info->setValue(1);
101 $info->setChecked(ilContainer::_lookupContainerSetting(
102 $a_obj_id,
103 self::INFO_TAB_VISIBILITY,
104 true
105 ));
106 //$info->setOptionTitle($lng->txt('obj_tool_setting_info_tab'));
107 $info->setInfo($lng->txt('obj_tool_setting_info_tab_info'));
108 $form->addItem($info);
109 }
110
111 // calendar
112 if (in_array(self::CALENDAR_CONFIGURATION, $services)) {
114 if ($settings->isEnabled()) {
115 $active = new ilCheckboxInputGUI(
116 $lng->txt('obj_tool_setting_calendar_active'),
117 self::CALENDAR_ACTIVATION
118 );
119 $active->setValue(1);
120 $active->setChecked(ilCalendarSettings::lookupCalendarActivated($a_obj_id));
121 $active->setInfo($lng->txt('obj_tool_setting_calendar_active_info'));
122
123 $visible = new ilCheckboxInputGUI(
124 $lng->txt('obj_tool_setting_calendar'),
125 self::CALENDAR_VISIBILITY
126 );
127 $visible->setValue(1);
129 $visible->setInfo($lng->txt('obj_tool_setting_calendar_info'));
130 $active->addSubItem($visible);
131
132 $form->addItem($active);
133 }
134 }
135
136 // news
137 if (in_array(self::USE_NEWS, $services)) {
138 $news = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_use_news'), self::USE_NEWS);
139 $news->setValue(1);
141 $a_obj_id,
142 self::USE_NEWS,
143 true
144 );
145 $news->setChecked($checked);
146 $info = $lng->txt('obj_tool_setting_use_news_info');
147 if ($checked) {
148 $info .= " <a href='" . $ilCtrl->getLinkTargetByClass("ilcontainernewssettingsgui", "") .
149 "'>ยป " . $lng->txt('obj_tool_setting_use_news_open_settings') . "</a>";
150 }
151 $news->setInfo($info);
152 $form->addItem($news);
153 }
154 if (in_array(self::NEWS_VISIBILITY, $services)) {
155 if ($ilSetting->get('block_activated_news')) {
156 // Container tools (calendar, news, ... activation)
157 $news = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_news'), self::NEWS_VISIBILITY);
158 $news->setValue(1);
159 $news->setChecked(ilContainer::_lookupContainerSetting(
160 $a_obj_id,
161 self::NEWS_VISIBILITY,
162 $ilSetting->get('block_activated_news', true)
163 ));
164 //$news->setOptionTitle($lng->txt('obj_tool_setting_news'));
165 $news->setInfo($lng->txt('obj_tool_setting_news_info'));
166 $form->addItem($news);
167
168 if (in_array(ilObject::_lookupType($a_obj_id), array('crs', 'grp'))) {
169 $ref_id = array_pop(ilObject::_getAllReferences($a_obj_id));
170
171 include_once 'Services/Membership/classes/class.ilMembershipNotifications.php';
173 }
174 }
175 }
176
177 // (local) custom metadata
178 if (in_array(self::CUSTOM_METADATA, $services)) {
179 $md = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_custom_metadata'), self::CUSTOM_METADATA);
180 $md->setInfo($lng->txt('obj_tool_setting_custom_metadata_info'));
181 $md->setValue(1);
183 $a_obj_id,
184 self::CUSTOM_METADATA,
185 false
186 ));
187 $form->addItem($md);
188 }
189
190 // tag cloud
191 if (in_array(self::TAG_CLOUD, $services)) {
192 $tags_active = new ilSetting("tags");
193 if ($tags_active->get("enable", false)) {
194 $tag = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_tag_cloud'), self::TAG_CLOUD);
195 $tag->setInfo($lng->txt('obj_tool_setting_tag_cloud_info'));
196 $tag->setValue(1);
198 $a_obj_id,
199 self::TAG_CLOUD,
200 false
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->setValue(1);
211 $a_obj_id,
212 self::TAXONOMIES,
213 false
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(ilContainer::_lookupContainerSetting(
228 $a_obj_id,
229 self::AUTO_RATING_NEW_OBJECTS,
230 false
231 ));
232 $form->addItem($rate);
233 }
234
235 // badges
236 if (in_array(self::BADGES, $services)) {
237 include_once 'Services/Badge/classes/class.ilBadgeHandler.php';
238 if (ilBadgeHandler::getInstance()->isActive()) {
239 $bdg = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_badges'), self::BADGES);
240 $bdg->setInfo($lng->txt('obj_tool_setting_badges_info'));
241 $bdg->setValue(1);
243 $a_obj_id,
244 self::BADGES,
245 false
246 ));
247 $form->addItem($bdg);
248 }
249 }
250 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
251 $position_settings = ilOrgUnitGlobalSettings::getInstance()->getObjectPositionSettingsByType(
252 ilObject::_lookupType($a_obj_id)
253 );
254 if (
255 $position_settings->isActive()
256 ) {
257 $lia = new ilCheckboxInputGUI(
258 $GLOBALS['DIC']->language()->txt('obj_orgunit_positions'),
259 self::ORGU_POSITION_ACCESS
260 );
261 $lia->setInfo($GLOBALS['DIC']->language()->txt('obj_orgunit_positions_info'));
262 $lia->setValue(1);
263 $lia->setChecked(
264 (bool) ilOrgUnitGlobalSettings::getInstance()->isPositionAccessActiveForObject($a_obj_id)
265 );
266 if (!$position_settings->isChangeableForObject()) {
267 $lia->setDisabled(true);
268 }
269 $form->addItem($lia);
270 }
271 }
272
273 // skills
274 if (in_array(self::SKILLS, $services)) {
275 $skmg_set = new ilSetting("skmg");
276 if ($skmg_set->get("enable_skmg")) {
277 $skill = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_skills'), self::SKILLS);
278 $skill->setInfo($lng->txt('obj_tool_setting_skills_info'));
279 $skill->setValue(1);
280 $skill->setChecked(ilContainer::_lookupContainerSetting(
281 $a_obj_id,
282 self::SKILLS,
283 false
284 ));
285 $form->addItem($skill);
286 }
287 }
288
289 // filter
290 if (in_array(self::FILTER, $services)) {
291 $filter = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_filter'), self::FILTER);
292 $filter->setInfo($lng->txt('obj_tool_setting_filter_info'));
293 $filter->setValue(1);
294 $filter->setChecked(ilContainer::_lookupContainerSetting(
295 $a_obj_id,
296 self::FILTER,
297 false
298 ));
299 $form->addItem($filter);
300
301 $filter_show_empty = new ilCheckboxInputGUI($lng->txt('obj_tool_setting_filter_empty'), "filter_show_empty");
302 $filter_show_empty->setInfo($lng->txt('obj_tool_setting_filter_empty_info'));
303 $filter_show_empty->setValue(1);
304 $filter_show_empty->setChecked(ilContainer::_lookupContainerSetting(
305 $a_obj_id,
306 "filter_show_empty",
307 false
308 ));
309 $filter->addSubItem($filter_show_empty);
310 }
311 // booking tool
312 if (in_array(self::BOOKING, $services)) {
313 $book = new ilCheckboxInputGUI($lng->txt('obj_tool_booking'), self::BOOKING);
314 $book->setInfo($lng->txt('obj_tool_booking_info'));
315 $book->setValue(1);
316 $book->setChecked(ilContainer::_lookupContainerSetting(
317 $a_obj_id,
318 self::BOOKING,
319 false
320 ));
321 $form->addItem($book);
322 }
323
324 if (in_array(self::EXTERNAL_MAIL_PREFIX, $services)) {
325 $externalMailPrefix = new ilTextInputGUI($lng->txt('obj_tool_ext_mail_subject_prefix'), self::EXTERNAL_MAIL_PREFIX);
326 $externalMailPrefix->setMaxLength(255);
327 $externalMailPrefix->setInfo($lng->txt('obj_tool_ext_mail_subject_prefix_info'));
328 $externalMailPrefix->setValue(ilContainer::_lookupContainerSetting($a_obj_id, self::EXTERNAL_MAIL_PREFIX, ''));
329 $form->addItem($externalMailPrefix);
330 }
331
332 return $form;
333 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static getInstance()
Constructor.
static lookupCalendarContentPresentationEnabled(int $obj_id)
static _getInstance()
get singleton instance
static lookupCalendarActivated($a_obj_id)
This class represents a checkbox property in a property form.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static addToSettingsForm($a_ref_id, ilPropertyFormGUI $a_form=null, ilFormPropertyGUI $a_input=null)
Add notification settings to form.
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
addItem($a_item)
Add Item (Property, SectionHeader).
ILIAS Setting Class.
This class represents a text property in a property form.
language()
Definition: language.php:2
global $ilSetting
Definition: privfeed.php:17
$lng

References $DIC, $GLOBALS, $ilSetting, $lng, ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilContainer\_lookupContainerSetting(), ilObject\_lookupType(), ilPropertyFormGUI\addItem(), ilMembershipNotifications\addToSettingsForm(), ilOrgUnitGlobalSettings\getInstance(), ilBadgeHandler\getInstance(), language(), ilCalendarSettings\lookupCalendarActivated(), and ilCalendarSettings\lookupCalendarContentPresentationEnabled().

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

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

◆ isModeActive()

ilObjectServiceSettingsGUI::isModeActive (   $a_mode)
protected

Check if specific mode is active.

Parameters
type$a_mode
Returns
type

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

539 {
540 return in_array($a_mode, $this->getModes());
541 }

References getModes().

Referenced by updateToolSettings().

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

◆ updateServiceSettingsForm()

static ilObjectServiceSettingsGUI::updateServiceSettingsForm (   $a_obj_id,
ilPropertyFormGUI  $form,
  $services 
)
static

Update service settings.

Parameters
int$a_obj_id
ilPropertyFormGUI$form
string[]$services
Returns
bool

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

346 {
347 // info
348 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
349 include_once './Services/Container/classes/class.ilContainer.php';
350 ilContainer::_writeContainerSetting($a_obj_id, self::INFO_TAB_VISIBILITY, (int) $form->getInput(self::INFO_TAB_VISIBILITY));
351 }
352
353 // calendar
354 if (in_array(self::CALENDAR_CONFIGURATION, $services)) {
355 if (ilCalendarSettings::_getInstance()->isEnabled()) {
356 $active = (int) $form->getInput(self::CALENDAR_ACTIVATION);
357 $visible = (int) $form->getInput(self::CALENDAR_VISIBILITY);
359 $a_obj_id,
360 self::CALENDAR_ACTIVATION,
361 $active
362 );
364 $a_obj_id,
365 self::CALENDAR_VISIBILITY,
366 $active ? $visible : 0
367 );
368 }
369 }
370 // news
371 if (in_array(self::USE_NEWS, $services)) {
372 include_once './Services/Container/classes/class.ilContainer.php';
373 ilContainer::_writeContainerSetting($a_obj_id, self::USE_NEWS, (int) $form->getInput(self::USE_NEWS));
374 }
375 if (in_array(self::NEWS_VISIBILITY, $services)) {
376 include_once './Services/Container/classes/class.ilContainer.php';
377 ilContainer::_writeContainerSetting($a_obj_id, self::NEWS_VISIBILITY, (int) $form->getInput(self::NEWS_VISIBILITY));
378
379 if (in_array(ilObject::_lookupType($a_obj_id), array('crs', 'grp'))) {
380 $ref_id = array_pop(ilObject::_getAllReferences($a_obj_id));
381
382 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
384 }
385 }
386
387 // rating
388 if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
389 include_once './Services/Container/classes/class.ilContainer.php';
390 ilContainer::_writeContainerSetting($a_obj_id, self::AUTO_RATING_NEW_OBJECTS, (int) $form->getInput(self::AUTO_RATING_NEW_OBJECTS));
391 }
392
393 // taxonomies
394 if (in_array(self::TAXONOMIES, $services)) {
395 include_once './Services/Container/classes/class.ilContainer.php';
396 ilContainer::_writeContainerSetting($a_obj_id, self::TAXONOMIES, (int) $form->getInput(self::TAXONOMIES));
397 }
398
399 // tag cloud
400 if (in_array(self::TAG_CLOUD, $services)) {
401 include_once './Services/Container/classes/class.ilContainer.php';
402 ilContainer::_writeContainerSetting($a_obj_id, self::TAG_CLOUD, (int) $form->getInput(self::TAG_CLOUD));
403 }
404
405 // (local) custom metadata
406 if (in_array(self::CUSTOM_METADATA, $services)) {
407 include_once './Services/Container/classes/class.ilContainer.php';
408 ilContainer::_writeContainerSetting($a_obj_id, self::CUSTOM_METADATA, (int) $form->getInput(self::CUSTOM_METADATA));
409 }
410
411 // badges
412 if (in_array(self::BADGES, $services)) {
413 include_once 'Services/Badge/classes/class.ilBadgeHandler.php';
414 if (ilBadgeHandler::getInstance()->isActive()) {
415 include_once './Services/Container/classes/class.ilContainer.php';
416 ilContainer::_writeContainerSetting($a_obj_id, self::BADGES, (int) $form->getInput(self::BADGES));
417 }
418 }
419
420 // booking
421 if (in_array(self::BOOKING, $services)) {
422 include_once './Services/Container/classes/class.ilContainer.php';
423 ilContainer::_writeContainerSetting($a_obj_id, self::BOOKING, (int) $form->getInput(self::BOOKING));
424 }
425
426 // extended user access
427 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
428 $position_settings = ilOrgUnitGlobalSettings::getInstance()->getObjectPositionSettingsByType(
429 ilObject::_lookupType($a_obj_id)
430 );
431
432 if ($position_settings->isActive() && $position_settings->isChangeableForObject()) {
433 $orgu_object_settings = new ilOrgUnitObjectPositionSetting($a_obj_id);
434 $orgu_object_settings->setActive(
435 (int) $form->getInput(self::ORGU_POSITION_ACCESS)
436 );
437 $orgu_object_settings->update();
438 }
439 }
440
441 // skills
442 if (in_array(self::SKILLS, $services)) {
443 $skmg_set = new ilSetting("skmg");
444 if ($skmg_set->get("enable_skmg")) {
445 include_once './Services/Container/classes/class.ilContainer.php';
446 ilContainer::_writeContainerSetting($a_obj_id, self::SKILLS, (int) $form->getInput(self::SKILLS));
447 }
448 }
449
450 // filter
451 if (in_array(self::FILTER, $services)) {
452 include_once './Services/Container/classes/class.ilContainer.php';
453 ilContainer::_writeContainerSetting($a_obj_id, self::FILTER, (int) $form->getInput(self::FILTER));
454 ilContainer::_writeContainerSetting($a_obj_id, "filter_show_empty", (int) $form->getInput("filter_show_empty"));
455 }
456
457 if (in_array(self::EXTERNAL_MAIL_PREFIX, $services)) {
458 ilContainer::_writeContainerSetting($a_obj_id, self::EXTERNAL_MAIL_PREFIX, $form->getInput(self::EXTERNAL_MAIL_PREFIX));
459 }
460
461 return true;
462 }
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static importFromForm($a_ref_id, ilPropertyFormGUI $a_form=null)
Import notification settings from form.
Stores object activation status of orgunit position settings.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References 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(), ilObjSurveyGUI\savePropertiesObject(), ilIndividualAssessmentCommonSettingsGUI\saveSettings(), ilStudyProgrammeCommonSettingsGUI\saveSettings(), ilObjWikiGUI\saveSettingsObject(), ilObjBookingPoolGUI\updateCustom(), ilObjContentPageGUI\updateCustom(), ilObjExerciseGUI\updateCustom(), ilObjMediaPoolGUI\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 509 of file class.ilObjectServiceSettingsGUI.php.

510 {
511 global $DIC;
512
513 $lng = $DIC->language();
515
516 $form = $this->initSettingsForm();
517 if ($form->checkInput()) {
518 include_once './Services/Calendar/classes/class.ilCalendarSettings.php';
519 if (ilCalendarSettings::_getInstance()->isEnabled()) {
520 if ($this->isModeActive(self::CALENDAR_VISIBILITY)) {
521 ilContainer::_writeContainerSetting($this->getObjId(), 'show_calendar', (int) $form->getInput('calendar'));
522 }
523 }
524 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
525 $ctrl->redirect($this);
526 }
527
528 ilUtil::sendFailure($lng->txt('err_check_input'));
529 $form->setValuesByPost();
530 $this->editSettings($form);
531 }
editSettings(ilPropertyFormGUI $form=null)
Edit tool settings (calendar, news, comments, ...)
isModeActive($a_mode)
Check if specific mode is active.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $ctrl, $DIC, $lng, ilCalendarSettings\_getInstance(), ilContainer\_writeContainerSetting(), editSettings(), getObjId(), isModeActive(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjectServiceSettingsGUI::$ctrl
protected

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

Referenced by cancel(), executeCommand(), and updateToolSettings().

◆ $gui

ilObjectServiceSettingsGUI::$gui = null
private

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

◆ $modes

ilObjectServiceSettingsGUI::$modes = array()
private

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

Referenced by getModes().

◆ $obj_id

ilObjectServiceSettingsGUI::$obj_id = 0
private

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

Referenced by getObjId().

◆ 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 28 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 27 of file class.ilObjectServiceSettingsGUI.php.

Referenced by ilObjectDataSet\importRecord().

◆ 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

◆ TAXONOMIES

◆ USE_NEWS


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