32 protected \ILIAS\DI\UIServices
$ui;
39 bool $a_call_by_reference =
true,
40 bool $a_prepare_output =
true
44 $this->
lng = $DIC->language();
45 $this->rbacsystem =
$DIC->rbac()->system();
46 $this->
ctrl = $DIC->ctrl();
47 $this->request =
$DIC->http()->request();
48 $this->
tabs = $DIC->tabs();
49 $this->
ui = $DIC->ui();
50 $this->setting =
$DIC->settings();
51 $this->main_tpl =
$DIC->ui()->mainTemplate();
57 $this->
lng->loadLanguageModule(
"note");
79 switch ($next_class) {
80 case 'ilpermissiongui':
87 if ($cmd ===
"view") {
88 $cmd =
"editSettings";
90 if (in_array($cmd, [
"editSettings",
"saveSettings"])) {
141 $subfields[
"comm_del_user"] =
$f->input()->field()->checkbox(
142 $lng->
txt(
"note_enable_comments_del_user"),
143 $lng->
txt(
"note_enable_comments_del_user_info")
145 ->withValue((
bool)
$setting->
get(
"comments_del_user",
'0'));
146 $subfields[
"comm_del_tutor"] =
$f->input()->field()->checkbox(
147 $lng->
txt(
"note_enable_comments_del_tutor"),
148 $lng->
txt(
"note_enable_comments_del_tutor_info")
150 ->withValue((
bool)
$setting->
get(
"comments_del_tutor",
'1'));
151 $subfields[
"comments_noti_recip"] =
$f->input()->field()->text(
152 $lng->
txt(
"note_comments_notification"),
153 $lng->
txt(
"note_comments_notification_info")
155 ->withValue((
string)
$setting->
get(
"comments_noti_recip"));
158 $subfields[
"enable_comments_export"] =
$f->input()->field()->checkbox(
159 $lng->
txt(
"enable_comments_export"),
160 $lng->
txt(
"note_enable_comments_export_info")
162 ->withValue($privacy->enabledCommentsExport());
165 $fields[
"enable_comments"] =
$f->input()->field()->optionalGroup(
167 $lng->
txt(
"note_enable_comments"),
171 $fields[
"enable_comments"] = $fields[
"enable_comments"]->withValue(
null);
175 $section1 =
$f->input()->field()->section($fields,
$lng->
txt(
"settings"));
178 return $f->input()->container()->form()->standard(
$form_action, [
"sec" => $section1]);
189 if (
$request->getMethod() ===
"POST") {
190 $form = $form->withRequest(
$request);
191 $data = $form->getData();
192 if (isset(
$data[
"sec"])) {
194 $disable_comments = (bool) (is_array(
$data) ? 0 : 1);
196 if (!$disable_comments) {
202 $privacy->enableCommentsExport((
bool)
$data[
'enable_comments_export']);
205 $this->main_tpl->setOnScreenMessage(
'info',
$lng->
txt(
"msg_obj_modified"),
true);
213 switch ($a_form_id) {
220 return array(array(
"editSettings", $fields));
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
getNextClass($a_gui_class=null)
@inheritDoc
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc
getCmd(?string $fallback_command=null)
@inheritDoc
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
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...
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput(bool $show_sub_objects=true)
ServerRequestInterface $request
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
set(string $a_key, string $a_val)
get(string $a_keyword, ?string $a_default_value=null)
get setting
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Add a Tab.
activateTab(string $a_id)
setContent(string $a_html)
Sets content for standard template.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.