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

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 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
withAvailableCallable(callable $is_available)
withVisibilityCallable(callable $is_visible)

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

+ Here is the call graph for this function:

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