39 public function __construct($a_parent_gui, $a_obj_id, $a_modes)
41 $this->gui = $a_parent_gui;
42 $this->modes = $a_modes;
43 $this->obj_id = $a_obj_id;
56 $next_class = $ilCtrl->getNextClass($this);
57 $cmd = $ilCtrl->getCmd(
'editSettings');
77 if(in_array(self::INFO_TAB_VISIBILITY, $services))
83 self::INFO_TAB_VISIBILITY,
87 $info->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_info_tab_info'));
92 if(in_array(self::CALENDAR_VISIBILITY, $services))
94 include_once
'./Services/Calendar/classes/class.ilObjCalendarSettings.php';
100 include_once
'./Services/Calendar/classes/class.ilObjCalendarSettings.php';
103 $cal->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_calendar_info'));
109 if(in_array(self::USE_NEWS, $services))
118 $news->setChecked($checked);
119 $info =
$GLOBALS[
'lng']->txt(
'obj_tool_setting_use_news_info');
122 $info.=
" <a href='".$ilCtrl->getLinkTargetByClass(
"ilcontainernewssettingsgui",
"").
123 "'>ยป ".$GLOBALS[
'lng']->txt(
'obj_tool_setting_use_news_open_settings').
"</a>";
125 $news->setInfo(
$info);
129 if(in_array(self::NEWS_VISIBILITY, $services))
131 if($ilSetting->get(
'block_activated_news'))
138 self::NEWS_VISIBILITY,
139 $ilSetting->get(
'block_activated_news',
true)
142 $news->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_news_info'));
149 include_once
'Services/Membership/classes/class.ilMembershipNotifications.php';
156 if(in_array(self::CUSTOM_METADATA, $services))
159 $md->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_custom_metadata_info'));
163 self::CUSTOM_METADATA,
170 if(in_array(self::TAG_CLOUD, $services))
173 if($tags_active->get(
"enable",
false))
176 $tag->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_tag_cloud_info'));
188 if(in_array(self::TAXONOMIES, $services))
201 if(in_array(self::AUTO_RATING_NEW_OBJECTS, $services))
203 $GLOBALS[
'lng']->loadLanguageModule(
"rating");
209 $rate->setInfo(
$GLOBALS[
'lng']->txt(
'rating_new_objects_auto_info'));
212 self::AUTO_RATING_NEW_OBJECTS,
219 if(in_array(self::BADGES, $services))
221 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
225 $bdg->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_badges_info'));
248 if(in_array(self::INFO_TAB_VISIBILITY, $services))
250 include_once
'./Services/Container/classes/class.ilContainer.php';
255 if(in_array(self::CALENDAR_VISIBILITY, $services))
257 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
260 include_once
'./Services/Container/classes/class.ilContainer.php';
266 if(in_array(self::USE_NEWS, $services))
268 include_once
'./Services/Container/classes/class.ilContainer.php';
271 if(in_array(self::NEWS_VISIBILITY, $services))
273 include_once
'./Services/Container/classes/class.ilContainer.php';
280 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
286 if(in_array(self::AUTO_RATING_NEW_OBJECTS, $services))
288 include_once
'./Services/Container/classes/class.ilContainer.php';
293 if(in_array(self::TAXONOMIES, $services))
295 include_once
'./Services/Container/classes/class.ilContainer.php';
300 if(in_array(self::TAG_CLOUD, $services))
302 include_once
'./Services/Container/classes/class.ilContainer.php';
307 if(in_array(self::CUSTOM_METADATA, $services))
309 include_once
'./Services/Container/classes/class.ilContainer.php';
314 if(in_array(self::BADGES, $services))
316 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
319 include_once
'./Services/Container/classes/class.ilContainer.php';
348 $GLOBALS[
'ilCtrl']->returnToParent($this);
359 $form = $this->initSettingsForm();
361 $GLOBALS[
'tpl']->setContent($form->getHTML());
370 $form = $this->initSettingsForm();
371 if($form->checkInput())
373 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
382 $GLOBALS[
'ilCtrl']->redirect($this);
386 $form->setValuesByPost();
397 return in_array($a_mode, $this->
getModes());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _getInstance()
get singleton instance
executeCommand()
Control class handling.
const CALENDAR_VISIBILITY
isModeActive($a_mode)
Check if specific mode is active.
static lookupCalendarActivated($a_obj_id)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
updateToolSettings()
Update settings.
static _getAllReferences($a_id)
get all reference ids of object
__construct($a_parent_gui, $a_obj_id, $a_modes)
Constructor.
static addToSettingsForm($a_ref_id, ilPropertyFormGUI $a_form=null, ilFormPropertyGUI $a_input=null)
Add notification settings to form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
const AUTO_RATING_NEW_OBJECTS
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
const INFO_TAB_VISIBILITY
static _writeContainerSetting($a_id, $a_keyword, $a_value)
editSettings(ilPropertyFormGUI $form=null)
Edit tool settings (calendar, news, comments, ...)
GUI class for service settings (calendar, notes, comments)
static importFromForm($a_ref_id, ilPropertyFormGUI $a_form=null)
Import notification settings from form.
getModes()
Get active modes.
static getInstance()
Constructor.