ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilNotesGlobalScreenProvider Class Reference

Class ilNotesGlobalScreenProvider. More...

+ Inheritance diagram for ilNotesGlobalScreenProvider:
+ Collaboration diagram for ilNotesGlobalScreenProvider:

Public Member Functions

 __construct (\ILIAS\DI\Container $dic)
 
 getTopItem ()
 Some other components want to provide Items for the main menu which are located at the PD TopTitem by default. More...
 
 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 ()
 

Protected Attributes

 $top_item
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 $dic
 
 $if
 
 $mainmenu
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Additional Inherited Members

- Data Fields inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider
const PURPOSE_MAINBAR = 'mainmenu'
 
- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilNotesGlobalScreenProvider::__construct ( \ILIAS\DI\Container  $dic)

Definition at line 20 of file class.ilNotesGlobalScreenProvider.php.

References getTopItem().

21  {
22  parent::__construct($dic);
23  $this->top_item = (new ilPDGlobalScreenProvider($dic))->getTopItem();
24  }
getTopItem()
Some other components want to provide Items for the main menu which are located at the PD TopTitem by...
Class ilPDGlobalScreenProvider.
+ Here is the call graph for this function:

Member Function Documentation

◆ getStaticSubItems()

ilNotesGlobalScreenProvider::getStaticSubItems ( )

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

Definition at line 52 of file class.ilNotesGlobalScreenProvider.php.

References $action, $c, ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider\$dic, $t, $title, getTopItem(), and if.

52  : array
53  {
54  $dic = $this->dic;
55 
56  $action = function () use ($dic) : string {
57  $c = "jumpToNotes";
58  if ($dic->settings()->get("disable_notes")) {
59  $c = "jumpToComments";
60  }
61 
62  return "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=" . $c;
63  };
64  $action = $action();
65  $title = function () use ($dic) : string {
66  $dic->language()->loadLanguageModule("notes");
67  $t = $dic->language()->txt("notes");
68  if (!$dic->settings()->get("disable_notes") && !$dic->settings()->get("disable_comments")) {
69  $t = $dic->language()->txt("notes_and_comments");
70  }
71  if ($dic->settings()->get("disable_notes")) {
72  $t = $dic->language()->txt("notes_comments");
73  }
74 
75  return $t;
76  };
77  $title = $title();
78 
79  return [$this->mainmenu->link($this->if->identifier('mm_pd_notes'))
80  ->withTitle($title)
81  ->withAction($action)
82  ->withParent($this->getTopItem())
83  ->withPosition(11)
84  ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
85  ->withAvailableCallable(
86  function () use ($dic) {
87  return (bool) (!$dic->settings()->get("disable_notes") || !$dic->settings()->get("disable_comments"));
88  }
89  )];
90  }
$action
getTopItem()
Some other components want to provide Items for the main menu which are located at the PD TopTitem by...
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
+ Here is the call graph for this function:

◆ getStaticTopItems()

ilNotesGlobalScreenProvider::getStaticTopItems ( )

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

Definition at line 43 of file class.ilNotesGlobalScreenProvider.php.

43  : array
44  {
45  return [];
46  }

◆ getTopItem()

ilNotesGlobalScreenProvider::getTopItem ( )

Some other components want to provide Items for the main menu which are located at the PD TopTitem by default.

Therefore we have to provide our TopTitem Identification for others

Returns
IdentificationInterface

Definition at line 34 of file class.ilNotesGlobalScreenProvider.php.

References $top_item.

Referenced by __construct(), and getStaticSubItems().

+ Here is the caller graph for this function:

Field Documentation

◆ $top_item

ilNotesGlobalScreenProvider::$top_item
protected

Definition at line 17 of file class.ilNotesGlobalScreenProvider.php.

Referenced by getTopItem().


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