ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Notifications\Provider\NotificationCenterProvider Class Reference
+ Inheritance diagram for ILIAS\Notifications\Provider\NotificationCenterProvider:
+ Collaboration diagram for ILIAS\Notifications\Provider\NotificationCenterProvider:

Public Member Functions

 getMetaBarItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
 __construct (Container $dic)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\MetaBarProviderInterface
 getProviderNameForPresentation ()
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
Container $dic
 
IdentificationProviderInterface $if
 
MetaBarItemFactory $meta_bar
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Member Function Documentation

◆ getMetaBarItems()

ILIAS\Notifications\Provider\NotificationCenterProvider::getMetaBarItems ( )

Implements ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider.

Definition at line 34 of file NotificationCenterProvider.php.

References $id, and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

34  : array
35  {
36  $mb = $this->globalScreen()->metaBar();
37 
38  $id = function (string $id): IdentificationInterface {
39  return $this->if->identifier($id);
40  };
41 
42  $nc = $this->dic->globalScreen()->collector()->notifications();
43 
44  $new = $nc->getAmountOfNewNotifications();
45  $old = $nc->getAmountOfOldNotifications();
46 
47  return [
48  $mb->notificationCenter($id('notification_center'))
49  ->withAmountOfOldNotifications($new + $old)
50  ->withAmountOfNewNotifications($new)
51  ->withNotifications($nc->getNotifications())
52  ->withAvailableCallable(function (): bool {
53  return $this->dic->ctrl()->getCmd() !== "showLogout";
54  })
55  ->withVisibilityCallable(
56  function (): bool {
57  return (
58  !$this->dic->user()->isAnonymous() &&
59  $this->dic->globalScreen()->collector()->notifications()->hasItems()
60  );
61  }
62  ),
63  ];
64  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

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