ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Notes\Provider\NotesMainBarProvider Class Reference

Class NotesMainBarProvider. More...

+ Inheritance diagram for ILIAS\Notes\Provider\NotesMainBarProvider:
+ Collaboration diagram for ILIAS\Notes\Provider\NotesMainBarProvider:

Public Member Functions

 getStaticTopItems ()
 
 getStaticSubItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 __construct (Container $dic)
 
 getAllIdentifications ()
 
 provideTypeInformation ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
Container $dic
 
IdentificationProviderInterface $if
 
MainMenuItemFactory $mainmenu
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Member Function Documentation

◆ getStaticSubItems()

ILIAS\Notes\Provider\NotesMainBarProvider::getStaticSubItems ( )
Returns
isItem[] These are Entries which will be available for configuration.

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 36 of file NotesMainBarProvider.php.

References $comments, ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider\$dic, ILIAS\UI\Component\Symbol\Icon\Standard\COMS, ILIAS\DI\Container\ctrl(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getInstance(), if, ILIAS\DI\Container\language(), ILIAS\UI\Component\Symbol\Icon\Standard\NOTS, and ILIAS\DI\Container\settings().

36  : array
37  {
38  $dic = $this->dic;
39  $ctrl = $dic->ctrl();
40 
41  // Comments
42  $title = $dic->language()->txt("mm_comments");
43  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::COMS, $title);
44  $ctrl->setParameterByClass(\ilPDNotesGUI::class, "note_type", 2);
45  $comments = $this->mainmenu->link($this->if->identifier('mm_pd_comments'))
46  ->withTitle($title)
47  ->withAction($ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilPDNotesGUI"], "showPublicComments"))
48  ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
49  ->withPosition(50)
50  ->withSymbol($icon)
51  ->withNonAvailableReason($this->dic->ui()->factory()->legacy($this->dic->language()->txt('component_not_active')))
52  ->withAvailableCallable(
53  static function () use ($dic): bool {
54  return !$dic->settings()->get("disable_comments");
55  }
56  );
57 
58  $title = $dic->language()->txt("mm_notes");
59  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::NOTS, $title);
60 
61  // Notes
62  $ctrl->setParameterByClass(\ilPDNotesGUI::class, "note_type", 1);
63  $notes = $this->mainmenu->link($this->if->identifier('mm_pd_notes'))
64  ->withTitle($title)
65  ->withAction($ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilPDNotesGUI"], "showPrivateNotes"))
66  ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification())
67  ->withPosition(70)
68  ->withSymbol($icon)
69  ->withNonAvailableReason($this->dic->ui()->factory()->legacy($this->dic->language()->txt('component_not_active')))
70  ->withAvailableCallable(
71  static function () use ($dic): bool {
72  return !$dic->settings()->get("disable_notes");
73  }
74  );
75 
76  return [
77  $comments,
78  $notes,
79  ];
80  }
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
language()
Get interface to the i18n service.
Definition: Container.php:86
$comments
ctrl()
Get the interface to the control structure.
Definition: Container.php:54
settings()
Get the interface to the settings.
Definition: Container.php:126
+ Here is the call graph for this function:

◆ getStaticTopItems()

ILIAS\Notes\Provider\NotesMainBarProvider::getStaticTopItems ( )
Returns
TopParentItem[] These are Slates which will be available for configuration.

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 31 of file NotesMainBarProvider.php.

31  : array
32  {
33  return [];
34  }

The documentation for this class was generated from the following file: