23 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
55 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
59 $this->rbacsystem = $DIC->rbac()->system();
60 $this->error = $DIC[
"ilErr"];
61 $this->access = $DIC->access();
62 $this->ctrl = $DIC->ctrl();
63 $this->lng = $DIC->language();
65 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
67 $this->lng->loadLanguageModule(
'mcst');
83 $next_class = $this->ctrl->getNextClass($this);
84 $cmd = $this->ctrl->getCmd();
88 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
89 $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
92 switch ($next_class) {
93 case 'ilpermissiongui':
94 $this->tabs_gui->setTabActive(
'perm_settings');
95 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
97 $this->ctrl->forwardCommand($perm_gui);
101 if (!$cmd || $cmd ==
'view') {
102 $cmd =
"editSettings";
122 if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
123 $this->tabs_gui->addTarget(
124 "mcst_edit_settings",
125 $this->ctrl->getLinkTarget($this,
"editSettings"),
126 array(
"editSettings",
"view")
130 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
131 $this->tabs_gui->addTarget(
133 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
145 $this->tabs_gui->setTabActive(
'mcst_edit_settings');
158 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
159 foreach ($this->
settings->getPurposeSuffixes() as $purpose => $filetypes) {
160 $purposeSuffixes[$purpose] = explode(
",", preg_replace(
"/[^\w,]/",
"", strtolower(
$_POST[$purpose])));
163 $this->
settings->setPurposeSuffixes($purposeSuffixes);
172 $ilCtrl->redirect($this,
"view");
182 $ilCtrl->redirect($this,
"view");
191 include_once(
'Modules/MediaCast/classes/class.ilMediaCastSettings.php');
204 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
207 $form->setFormAction($this->ctrl->getFormAction($this));
208 $form->setTitle($this->lng->txt(
'settings'));
210 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
211 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
212 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
218 $radio_group->addOption($radio_option);
219 $radio_option =
new ilRadioOption(
$lng->txt(
"mcst_visibility_public"),
"public");
220 $radio_group->addOption($radio_option);
221 $radio_group->
setInfo(
$lng->txt(
"mcst_news_item_visibility_info"));
222 $radio_group->setRequired(
false);
223 $radio_group->setValue($this->
settings->getDefaultAccess());
224 #$ch->addSubItem($radio_group); 225 $form->addItem($radio_group);
228 foreach ($this->
settings->getPurposeSuffixes() as $purpose => $filetypes) {
229 if ($purpose !=
"VideoAlternative") {
231 $text->setValue(implode(
",", $filetypes));
232 $text->setInfo(
$lng->txt(
"mcst_" . strtolower($purpose) .
"_settings_info"));
238 $text->setInfo(
$lng->txt(
"mcst_mimetypes_info"));
241 if (is_array($this->
settings->getMimeTypes())) {
242 $text->setValue(implode(
",", $this->
settings->getMimeTypes()));
246 $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
if(isset($_POST['submit'])) $form
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.