ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 (protected 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
 

Detailed Description

Member Function Documentation

◆ getMetaBarItems()

ILIAS\Notifications\Provider\NotificationCenterProvider::getMetaBarItems ( )
Returns
isItem[]

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

Definition at line 31 of file NotificationCenterProvider.php.

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

31  : array
32  {
33  $mb = $this->globalScreen()->metaBar();
34 
35  $id = function (string $id): IdentificationInterface {
36  return $this->if->identifier($id);
37  };
38 
39  $nc = $this->dic->globalScreen()->collector()->notifications();
40 
41  $new = $nc->getAmountOfNewNotifications();
42  $old = $nc->getAmountOfOldNotifications();
43 
44  return [
45  $mb->notificationCenter($id('notification_center'))
46  ->withAmountOfOldNotifications($new + $old)
47  ->withAmountOfNewNotifications($new)
48  ->withNotifications($nc->getNotifications())
49  ->withAvailableCallable(function (): bool {
50  return $this->dic->ctrl()->getCmd() !== 'showLogout';
51  })
53  function (): bool {
54  return (
55  !$this->dic->user()->isAnonymous() &&
56  $this->dic->globalScreen()->collector()->notifications()->hasItems()
57  );
58  }
59  ),
60  ];
61  }
withAvailableCallable(callable $is_available)
withVisibilityCallable(callable $is_visible)
$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: