30 protected \ILIAS\DI\UIServices
$ui;
40 bool $a_call_by_reference =
true,
41 bool $a_prepare_output =
true 45 $this->
lng = $DIC->language();
46 $this->rbacsystem = $DIC->rbac()->system();
47 $this->
ctrl = $DIC->ctrl();
48 $this->request = $DIC->http()->request();
49 $this->
tabs = $DIC->tabs();
50 $this->
ui = $DIC->ui();
51 $this->setting = $DIC->settings();
52 $this->main_tpl = $DIC->ui()->mainTemplate();
58 $this->
lng->loadLanguageModule(
"pwsp");
69 $rbacsystem = $this->rbacsystem;
74 if (!$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
80 switch ($next_class) {
81 case 'ilpermissiongui':
89 $cmd =
"editSettings";
91 if (in_array($cmd, [
"editSettings",
"saveSettings"])) {
100 $rbacsystem = $this->rbacsystem;
105 if ($rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
113 if ($rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
125 $this->tpl->setContent($form->getHTML());
138 $form->setFormAction($ilCtrl->getFormAction($this,
"saveWsp"));
139 $form->setTitle(
$lng->
txt(
"obj_prss"));
144 $wsp_prop->setChecked(!
$ilSetting->get(
'disable_personal_workspace'));
145 $form->addItem($wsp_prop);
150 $blog_prop->setChecked(!
$ilSetting->get(
'disable_wsp_blogs'));
151 $wsp_prop->addSubItem($blog_prop);
156 $file_prop->setChecked(!
$ilSetting->get(
'disable_wsp_files'));
157 $wsp_prop->addSubItem($file_prop);
162 $link_prop->setChecked(!
$ilSetting->get(
'disable_wsp_links'));
163 $wsp_prop->addSubItem($link_prop);
165 if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
167 $form->addCommandButton(
"saveSettings",
$lng->
txt(
"save"));
168 $form->addCommandButton(
"editSettings",
$lng->
txt(
"cancel"));
179 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
180 $ilCtrl->redirect($this,
"view");
184 if ($form->checkInput()) {
185 $wsp = $form->getInput(
"wsp");
186 $blog = $form->getInput(
"blog");
187 $file = $form->getInput(
"file");
188 $link = $form->getInput(
"link");
197 $ilSetting->set(
'disable_personal_workspace', (
string) !$wsp);
198 $ilSetting->set(
'disable_wsp_blogs', (
string) !$blog);
199 $ilSetting->set(
'disable_wsp_files', (
string) !$file);
200 $ilSetting->set(
'disable_wsp_links', (
string) !$link);
203 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
204 $ilCtrl->redirect($this,
"editSettings");
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getCmd(string $fallback_command=null)
prepareOutput(bool $show_sub_objects=true)
__construct( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
forwardCommand(object $a_gui_object)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNextClass($a_gui_class=null)
Class ilObjectGUI Basic methods of all Output classes.
ilGlobalTemplateInterface $main_tpl
activateTab(string $a_id)
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
__construct(Container $dic, ilPlugin $plugin)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
addTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Add a Tab.