3declare(strict_types=1);
69 $this->main_tpl =
$DIC->ui()->mainTemplate();
70 $this->
ctrl = $DIC->ctrl();
71 $this->
lng = $DIC[
"lng"];
73 $this->gui = $parent_gui;
74 $this->modes =
$DIC->refinery()->to()->listOf(
75 $DIC->refinery()->kindlyTo()->string()
83 $this->
ctrl->getNextClass($this);
84 $cmd = $this->
ctrl->getCmd(
'editSettings');
96 $ilCtrl =
$DIC->ctrl();
102 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
104 $info->setValue(
"1");
107 self::INFO_TAB_VISIBILITY
110 $info->setInfo(
$lng->
txt(
'obj_tool_setting_info_tab_info'));
115 if (in_array(self::CALENDAR_CONFIGURATION, $services)) {
119 $lng->
txt(
'obj_tool_setting_calendar_active'),
120 self::CALENDAR_ACTIVATION
122 $active->setValue(
"1");
124 $active->setInfo(
$lng->
txt(
'obj_tool_setting_calendar_active_info'));
127 $lng->
txt(
'obj_tool_setting_calendar'),
128 self::CALENDAR_VISIBILITY
130 $visible->setValue(
"1");
132 $visible->setInfo(
$lng->
txt(
'obj_tool_setting_calendar_info'));
133 $active->addSubItem($visible);
140 if (in_array(self::USE_NEWS, $services)) {
142 $news->setValue(
"1");
147 $news->setChecked($checked);
148 $info =
$lng->
txt(
'obj_tool_setting_use_news_info');
150 $info .=
" <a href='" . $ilCtrl->getLinkTargetByClass(
"ilcontainernewssettingsgui",
"") .
151 "'>ยป " .
$lng->
txt(
'obj_tool_setting_use_news_open_settings') .
"</a>";
153 $news->setInfo($info);
156 if (in_array(self::NEWS_VISIBILITY, $services)) {
157 if (
$ilSetting->get(
'block_activated_news')) {
160 $news->setValue(
"1");
163 self::NEWS_VISIBILITY,
167 $news->setInfo(
$lng->
txt(
'obj_tool_setting_news_info'));
180 if (in_array(self::CUSTOM_METADATA, $services)) {
182 $md->setInfo(
$lng->
txt(
'obj_tool_setting_custom_metadata_info'));
186 self::CUSTOM_METADATA
192 if (in_array(self::TAG_CLOUD, $services)) {
194 if ($tags_active->get(
"enable")) {
196 $tag->setInfo(
$lng->
txt(
'obj_tool_setting_tag_cloud_info'));
207 if (in_array(self::TAXONOMIES, $services)) {
209 $tax->setInfo(
$lng->
txt(
'obj_tool_setting_taxonomies_info'));
219 if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
224 $rate->setValue(
"1");
226 $rate->setInfo(
$lng->
txt(
'rating_new_objects_auto_info'));
229 self::AUTO_RATING_NEW_OBJECTS
235 if (in_array(self::BADGES, $services)) {
238 $bdg->setInfo(
$lng->
txt(
'obj_tool_setting_badges_info'));
247 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
252 $position_settings->isActive()
256 self::ORGU_POSITION_ACCESS
258 $lia->setInfo(
$GLOBALS[
'DIC']->
language()->txt(
'obj_orgunit_positions_info'));
263 if (!$position_settings->isChangeableForObject()) {
264 $lia->setDisabled(
true);
271 if (in_array(self::SKILLS, $services)) {
273 if ($skmg_set->get(
"enable_skmg")) {
275 $skill->setInfo(
$lng->
txt(
'obj_tool_setting_skills_info'));
276 $skill->setValue(
"1");
286 if (in_array(self::FILTER, $services)) {
288 $filter->setInfo(
$lng->
txt(
'obj_tool_setting_filter_info'));
289 $filter->setValue(
"1");
297 $filter_show_empty->setInfo(
$lng->
txt(
'obj_tool_setting_filter_empty_info'));
298 $filter_show_empty->setValue(
"1");
303 $filter->addSubItem($filter_show_empty);
306 if (in_array(self::BOOKING, $services)) {
308 $book->setInfo(
$lng->
txt(
'obj_tool_booking_info'));
309 $book->setValue(
"1");
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'));
322 $form->
addItem($externalMailPrefix);
334 if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
337 self::INFO_TAB_VISIBILITY,
338 $form->
getInput(self::INFO_TAB_VISIBILITY)
343 if (in_array(self::CALENDAR_CONFIGURATION, $services)) {
345 $active = $form->
getInput(self::CALENDAR_ACTIVATION);
346 $visible = $form->
getInput(self::CALENDAR_VISIBILITY);
349 self::CALENDAR_ACTIVATION,
354 self::CALENDAR_VISIBILITY,
355 $active ? $visible :
""
360 if (in_array(self::USE_NEWS, $services)) {
363 if (in_array(self::NEWS_VISIBILITY, $services)) {
375 if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
378 self::AUTO_RATING_NEW_OBJECTS,
379 $form->
getInput(self::AUTO_RATING_NEW_OBJECTS)
384 if (in_array(self::TAXONOMIES, $services)) {
389 if (in_array(self::TAG_CLOUD, $services)) {
394 if (in_array(self::CUSTOM_METADATA, $services)) {
399 if (in_array(self::BADGES, $services)) {
406 if (in_array(self::BOOKING, $services)) {
411 if (in_array(self::ORGU_POSITION_ACCESS, $services)) {
416 if ($position_settings->isActive() && $position_settings->isChangeableForObject()) {
418 $orgu_object_settings->setActive(
419 (
bool) $form->
getInput(self::ORGU_POSITION_ACCESS)
421 $orgu_object_settings->update();
426 if (in_array(self::SKILLS, $services)) {
428 if ($skmg_set->get(
"enable_skmg")) {
434 if (in_array(self::FILTER, $services)) {
439 if (in_array(self::EXTERNAL_MAIL_PREFIX, $services)) {
461 return $this->obj_id;
466 $this->
ctrl->returnToParent($this);
477 $form = $this->initSettingsForm();
479 $this->main_tpl->setContent($form->
getHTML());
489 $form = $this->initSettingsForm();
492 if ($this->isModeActive(self::CALENDAR_VISIBILITY)) {
496 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
497 $this->
ctrl->redirect($this);
500 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
502 $this->editSettings($form);
510 return in_array($mode, $this->getModes(),
true);
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static lookupCalendarContentPresentationEnabled(int $obj_id)
static lookupCalendarActivated(int $a_obj_id)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
Class ilCtrl provides processing control methods.
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 importFromForm(int $a_ref_id, ?ilPropertyFormGUI $a_form=null)
static addToSettingsForm(int $a_ref_id, ?ilPropertyFormGUI $a_form=null, ?ilFormPropertyGUI $a_input=null)
Add notification settings to form.
Class ilObjectGUI Basic methods of all Output classes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const CALENDAR_ACTIVATION
const AUTO_RATING_NEW_OBJECTS
const CALENDAR_CONFIGURATION
isModeActive(string $mode)
Check if specific mode is active.
getModes()
Get active modes.
const EXTERNAL_MAIL_PREFIX
const ORGU_POSITION_ACCESS
__construct(ilObjectGUI $parent_gui, int $obj_id, array $modes)
Constructor.
updateToolSettings()
Update settings.
editSettings(ilPropertyFormGUI $form=null)
Edit tool settings (calendar, news, comments, ...)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const INFO_TAB_VISIBILITY
ilGlobalTemplateInterface $main_tpl
const CALENDAR_VISIBILITY
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 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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...