23 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
45 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
48 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
50 $this->lng->loadLanguageModule(
'mcst');
62 global $rbacsystem,
$ilErr,$ilAccess;
64 $next_class = $this->ctrl->getNextClass($this);
65 $cmd = $this->ctrl->getCmd();
69 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
71 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
76 case 'ilpermissiongui':
77 $this->tabs_gui->setTabActive(
'perm_settings');
78 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
80 $this->ctrl->forwardCommand($perm_gui);
86 $cmd =
"editSettings";
103 global $rbacsystem, $ilAccess;
105 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
107 $this->tabs_gui->addTarget(
"mcst_edit_settings",
108 $this->ctrl->getLinkTarget($this,
"editSettings"),
109 array(
"editSettings",
"view"));
112 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
114 $this->tabs_gui->addTarget(
"perm_settings",
115 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
116 array(),
'ilpermissiongui');
125 $this->tabs_gui->setTabActive(
'mcst_edit_settings');
137 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
139 foreach ($this->
settings->getPurposeSuffixes() as $purpose => $filetypes) {
140 $purposeSuffixes[$purpose] = explode(
",", preg_replace(
"/[^\w,]/",
"", strtolower(
$_POST[$purpose])));
143 $this->
settings->setPurposeSuffixes($purposeSuffixes);
145 $this->
settings->setMimeTypes (explode(
",",
$_POST[
"mimetypes"]));
152 $ilCtrl->redirect($this,
"view");
162 $ilCtrl->redirect($this,
"view");
171 include_once(
'Modules/MediaCast/classes/class.ilMediaCastSettings.php');
182 global
$lng, $ilAccess;
183 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
186 $form->setFormAction($this->ctrl->getFormAction($this));
187 $form->setTitle($this->lng->txt(
'settings'));
189 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
191 $form->addCommandButton(
'saveSettings',$this->lng->txt(
'save'));
192 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
197 $radio_option =
new ilRadioOption($lng->txt(
"mcst_visibility_users"),
"users");
198 $radio_group->addOption($radio_option);
199 $radio_option =
new ilRadioOption($lng->txt(
"mcst_visibility_public"),
"public");
200 $radio_group->addOption($radio_option);
201 $radio_group->
setInfo($lng->txt(
"mcst_news_item_visibility_info"));
202 $radio_group->setRequired(
false);
203 $radio_group->setValue($this->
settings->getDefaultAccess());
204 #$ch->addSubItem($radio_group); 205 $form->addItem($radio_group);
208 foreach ($this->
settings->getPurposeSuffixes() as $purpose => $filetypes)
210 if ($purpose !=
"VideoAlternative")
212 $text =
new ilTextInputGUI($lng->txt(
"mcst_".strtolower($purpose).
"_settings_title"),$purpose);
213 $text->setValue(implode(
",",$filetypes));
214 $text->setInfo($lng->txt(
"mcst_".strtolower($purpose).
"_settings_info"));
215 $form->addItem(
$text);
220 $text->setInfo($lng->txt(
"mcst_mimetypes_info"));
223 if (is_array($this->
settings->getMimeTypes()))
224 $text->setValue(implode(
",",$this->
settings->getMimeTypes()));
225 $form->addItem(
$text);
227 $this->tpl->setContent($form->getHTML());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
setInfo($a_info)
Set Info.
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
Create styles array
The data for the language used.
This class represents a text area property in a property form.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.