ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
 getAllIdentifications ()
 @inheritDoc More...
 
 provideTypeInformation ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getStaticTopItems ()
 
 getStaticSubItems ()
 
 provideTypeInformation ()
 
 getAllIdentifications ()
 

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
 

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.

36 : array
37 {
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()->content($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()->content($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 [
78 $notes,
79 ];
80 }
language()
Get interface to the i18n service.
Definition: Container.php:95
settings()
Get the interface to the settings.
Definition: Container.php:135
ctrl()
Get the interface to the control structure.
Definition: Container.php:63
if(!file_exists('../ilias.ini.php'))
$comments

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().

+ 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: