ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.GUIService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
27{
28 protected \ilSetting $settings;
29 protected \ilAccessHandler $access;
30 protected \ILIAS\Notes\GUIService $notes_gui;
33
34 public function __construct(
38 ) {
39 $this->domain = $domain;
40 $this->notes_gui = $notes_gui;
41 $this->gui = $gui;
42 $this->access = $domain->access();
43 $this->settings = $domain->settings();
44 }
45
46 public function commentGUI(int $mcst_ref_id, int $news_id): \ilCommentGUI
47 {
48 $comments_gui = $this->notes_gui->getCommentsGUI(
49 \ilObject::_lookupObjectId($mcst_ref_id),
50 0,
51 "mcst",
52 $news_id
53 );
54 $comments_gui->setUseObjectTitleHeader(false);
55
56 if ($this->access->checkAccess("write", "", $mcst_ref_id) &&
57 $this->settings->get("comments_del_tutor", '1')) {
58 $comments_gui->enablePublicNotesDeletion(true);
59 }
60
61 return $comments_gui;
62 }
63}
__construct(InternalDomainService $domain, InternalGUIService $gui, \ILIAS\Notes\GUIService $notes_gui)
commentGUI(int $mcst_ref_id, int $news_id)
setUseObjectTitleHeader(bool $a_val)
static _lookupObjectId(int $ref_id)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.