23 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
51 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
54 $this->error = $DIC[
"ilErr"];
55 $this->access = $DIC->access();
56 $this->ctrl = $DIC->ctrl();
57 $this->lng = $DIC->language();
61 $this->lng->loadLanguageModule(
'mcst');
73 $next_class = $this->ctrl->getNextClass($this);
74 $cmd = $this->ctrl->getCmd();
78 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
79 $this->error->raiseError($this->lng->txt(
'no_permission'), $this->error->WARNING);
82 switch ($next_class) {
83 case 'ilpermissiongui':
84 $this->tabs_gui->setTabActive(
'perm_settings');
85 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
87 $this->ctrl->forwardCommand($perm_gui);
91 if (!$cmd || $cmd ==
'view') {
92 $cmd =
"editSettings";
112 if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
113 $this->tabs_gui->addTarget(
114 "mcst_edit_settings",
115 $this->ctrl->getLinkTarget($this,
"editSettings"),
116 array(
"editSettings",
"view")
120 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
121 $this->tabs_gui->addTarget(
123 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
135 $this->tabs_gui->setTabActive(
'mcst_edit_settings');
148 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
149 foreach ($this->
settings->getPurposeSuffixes() as $purpose => $filetypes) {
150 $purposeSuffixes[$purpose] = explode(
",", preg_replace(
"/[^\w,]/",
"", strtolower(
$_POST[$purpose])));
153 $this->
settings->setPurposeSuffixes($purposeSuffixes);
159 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
162 $ilCtrl->redirect($this,
"view");
172 $ilCtrl->redirect($this,
"view");
181 include_once(
'Modules/MediaCast/classes/class.ilMediaCastSettings.php');
194 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
197 $form->setFormAction($this->ctrl->getFormAction($this));
198 $form->setTitle($this->lng->txt(
'settings'));
200 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
201 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
202 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
208 $radio_group->addOption($radio_option);
209 $radio_option =
new ilRadioOption(
$lng->txt(
"mcst_visibility_public"),
"public");
210 $radio_group->addOption($radio_option);
211 $radio_group->
setInfo(
$lng->txt(
"mcst_news_item_visibility_info"));
212 $radio_group->setRequired(
false);
213 $radio_group->setValue($this->
settings->getDefaultAccess());
214 #$ch->addSubItem($radio_group); 215 $form->addItem($radio_group);
218 foreach ($this->
settings->getPurposeSuffixes() as $purpose => $filetypes) {
219 if ($purpose !=
"VideoAlternative") {
220 $text =
new ilTextInputGUI(
$lng->txt(
"mcst_" . strtolower($purpose) .
"_settings_title"), $purpose);
221 $text->setValue(implode(
",", $filetypes));
222 $text->setInfo(
$lng->txt(
"mcst_" . strtolower($purpose) .
"_settings_info"));
223 $form->addItem($text);
231 if (is_array($this->
settings->getMimeTypes())) {
232 $text->setValue(implode(
",", $this->
settings->getMimeTypes()));
234 $form->addItem($text);
236 $this->tpl->setContent($form->getHTML());
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.
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.