29 public function __construct($a_parent_gui, $a_obj_id, $a_modes)
31 $this->gui = $a_parent_gui;
32 $this->modes = $a_modes;
33 $this->obj_id = $a_obj_id;
46 $next_class = $ilCtrl->getNextClass($this);
47 $cmd = $ilCtrl->getCmd(
'editSettings');
67 if(in_array(self::INFO_TAB_VISIBILITY, $services))
73 self::INFO_TAB_VISIBILITY,
77 $info->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_info_tab_info'));
82 if(in_array(self::CALENDAR_VISIBILITY, $services))
84 include_once
'./Services/Calendar/classes/class.ilObjCalendarSettings.php';
90 include_once
'./Services/Calendar/classes/class.ilObjCalendarSettings.php';
93 $cal->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_calendar_info'));
99 if(in_array(self::NEWS_VISIBILITY, $services))
101 if($ilSetting->get(
'block_activated_news'))
108 self::NEWS_VISIBILITY,
109 $ilSetting->get(
'block_activated_news',
true)
112 $news->setInfo(
$GLOBALS[
'lng']->txt(
'obj_tool_setting_news_info'));
118 if(in_array(self::AUTO_RATING_NEW_OBJECTS, $services))
120 $GLOBALS[
'lng']->loadLanguageModule(
"rating");
126 $rate->setInfo(
$GLOBALS[
'lng']->txt(
'rating_new_objects_auto_info'));
129 self::AUTO_RATING_NEW_OBJECTS,
147 if(in_array(self::INFO_TAB_VISIBILITY, $services))
149 include_once
'./Services/Container/classes/class.ilContainer.php';
154 if(in_array(self::CALENDAR_VISIBILITY, $services))
156 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
159 include_once
'./Services/Container/classes/class.ilContainer.php';
165 if(in_array(self::NEWS_VISIBILITY, $services))
167 include_once
'./Services/Container/classes/class.ilContainer.php';
172 if(in_array(self::AUTO_RATING_NEW_OBJECTS, $services))
174 include_once
'./Services/Container/classes/class.ilContainer.php';
202 $GLOBALS[
'ilCtrl']->returnToParent($this);
213 $form = $this->initSettingsForm();
215 $GLOBALS[
'tpl']->setContent($form->getHTML());
224 $form = $this->initSettingsForm();
225 if($form->checkInput())
227 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
236 $GLOBALS[
'ilCtrl']->redirect($this);
240 $form->setValuesByPost();
251 return in_array($a_mode, $this->
getModes());