ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.GUIService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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(
35  InternalDomainService $domain,
36  InternalGUIService $gui,
37  \ILIAS\Notes\GUIService $notes_gui
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 }
commentGUI(int $mcst_ref_id, int $news_id)
Interface Observer Contains several chained tasks and infos about them.
setUseObjectTitleHeader(bool $a_val)
static _lookupObjectId(int $ref_id)
Comment GUI.
__construct(InternalDomainService $domain, InternalGUIService $gui, \ILIAS\Notes\GUIService $notes_gui)