ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
NotesMainBarProvider.php
Go to the documentation of this file.
2
6
13{
14
18 public function getStaticTopItems() : array
19 {
20 return [];
21 }
22
23
27 public function getStaticSubItems() : array
28 {
30 $ctrl = $dic->ctrl();
31
32 // Comments
33 $title = $dic->language()->txt("mm_comments");
34 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::COMS, $title)->withIsOutlined(true);
35 $comments = $this->mainmenu->link($this->if->identifier('mm_pd_comments'))
36 ->withTitle($title)
37 ->withAction($ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilPDNotesGUI"], "showPublicComments"))
38 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
39 ->withPosition(40)
40 ->withSymbol($icon)
41 ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
42 ->withAvailableCallable(
43 function () use ($dic) {
44 return (bool) (!$dic->settings()->get("disable_comments"));
45 }
46 );
47
48 $title = $dic->language()->txt("mm_notes");
49 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::NOTS, $title)->withIsOutlined(true);
50
51 // Notes
52 $notes = $this->mainmenu->link($this->if->identifier('mm_pd_notes'))
53 ->withTitle($title)
54 ->withAction($ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilPDNotesGUI"], "showPrivateNotes"))
55 ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification())
56 ->withPosition(70)
57 ->withSymbol($icon)
58 ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
59 ->withAvailableCallable(
60 function () use ($dic) {
61 return (bool) (!$dic->settings()->get("disable_notes"));
62 }
63 );
64
65 return [
66 $comments,
67 $notes,
68 ];
69 }
70}
An exception for terminatinating execution or to throw for unit testing.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
This describes the specific behavior of an ILIAS standard icon.
Definition: Standard.php:10