3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
44 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
48 $this->rbacsystem = $DIC->rbac()->system();
49 $this->error = $DIC[
"ilErr"];
50 $this->access = $DIC->access();
51 $this->tabs = $DIC->tabs();
52 $this->tpl = $DIC[
"tpl"];
53 $this->lng = $DIC->language();
54 $this->ctrl = $DIC->ctrl();
56 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
58 $this->lng->loadLanguageModule(
'mob');
59 $this->lng->loadLanguageModule(
'mep');
60 $this->lng->loadLanguageModule(
'content');
75 $next_class = $this->ctrl->getNextClass($this);
76 $cmd = $this->ctrl->getCmd();
80 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
81 $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
84 switch ($next_class) {
85 case 'ilpermissiongui':
86 $this->tabs_gui->setTabActive(
'perm_settings');
87 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
89 $ret = $this->ctrl->forwardCommand($perm_gui);
93 if (!$cmd || $cmd ==
'view') {
94 $cmd =
"editSettings";
115 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
118 $this->ctrl->getLinkTarget($this,
"editSettings"),
119 array(
"editSettings",
"view")
123 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
126 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
144 $tpl->setContent($this->form->getHTML());
159 if ($this->form->checkInput()) {
162 $mset->set(
"mep_activate_pages",
$_POST[
"activate_pages"]);
163 $mset->set(
"file_manager_always",
$_POST[
"file_manager_always"]);
164 $mset->set(
"restricted_file_types",
$_POST[
"restricted_file_types"]);
165 $mset->set(
"black_list_file_types",
$_POST[
"black_list_file_types"]);
166 $mset->set(
"upload_dir",
$_POST[
"mob_upload_dir"]);
168 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
169 $ilCtrl->redirect($this,
"editSettings");
172 $this->form->setValuesByPost();
186 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
191 $cb->
setInfo(
$lng->txt(
"mobs_activate_pages_info"));
192 $this->form->addItem($cb);
196 $cb->
setInfo(
$lng->txt(
"mobs_always_show_file_manager_info"));
197 $this->form->addItem($cb);
200 $ta =
new ilTextAreaInputGUI($this->lng->txt(
"mobs_restrict_file_types"),
"restricted_file_types");
203 $ta->
setInfo($this->lng->txt(
"mobs_restrict_file_types_info"));
204 $this->form->addItem($ta);
207 $ta =
new ilTextAreaInputGUI($this->lng->txt(
"mobs_black_list_file_types"),
"black_list_file_types");
208 $ta->
setInfo($this->lng->txt(
"mobs_black_list_file_types_info"));
209 $this->form->addItem($ta);
213 $lng->txt(
"mob_upload_dir"),
216 $tx_prop->
setInfo(
$lng->txt(
"mob_upload_dir_info"));
217 $this->form->addItem($tx_prop);
219 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
220 $this->form->addCommandButton(
"saveSettings",
$lng->txt(
"save"));
223 $this->form->setTitle(
$lng->txt(
"settings"));
224 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
235 $values[
"activate_pages"] = $mset->get(
"mep_activate_pages");
236 $values[
"file_manager_always"] = $mset->get(
"file_manager_always");
237 $values[
"restricted_file_types"] = $mset->get(
"restricted_file_types");
238 $values[
"black_list_file_types"] = $mset->get(
"black_list_file_types");
239 $values[
"mob_upload_dir"] = $mset->get(
"upload_dir");
241 $this->form->setValuesByArray(
$values);
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.
This class represents a text area property in a property form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.