ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\BackgroundTasks\Provider\BTNotificationProvider Class Reference

Class BTNotificationProvider. More...

+ Inheritance diagram for ILIAS\BackgroundTasks\Provider\BTNotificationProvider:
+ Collaboration diagram for ILIAS\BackgroundTasks\Provider\BTNotificationProvider:

Public Member Functions

 getNotifications ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Notification\Provider\AbstractNotificationProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getAdministrativeNotifications ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getNotifications ()
 
 getAdministrativeNotifications ()
 

Private Member Functions

 txt (string $id)
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Notification\Provider\AbstractNotificationProvider
 $dic
 
 $if
 
 $notification_factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Member Function Documentation

◆ getNotifications()

ILIAS\BackgroundTasks\Provider\BTNotificationProvider::getNotifications ( )

@inheritDoc

Implements ILIAS\GlobalScreen\Scope\Notification\Provider\NotificationProvider.

Definition at line 19 of file BTNotificationProvider.php.

19 : array
20 {
21 $nr_buckets = count($this->dic->backgroundTasks()->persistence()->getBucketIdsOfUser($this->dic->user()->getId()));
22 if (!$nr_buckets) {
23 return [];
24 }
25
26 $this->dic->ui()->mainTemplate()->addJavaScript("./Services/BackgroundTasks/js/background_task_refresh.js");
27 $this->dic->language()->loadLanguageModule('background_tasks');
28
29 $id = function (string $id) : IdentificationInterface {
30 return $this->if->identifier($id);
31 };
32
33 $factory = $this->globalScreen()->notifications()->factory();
34
35 $item_source = new ilBTPopOverGUI($this->dic);
36 $group = $factory->standardGroup($id('bg_task_bucket_group'))
37 ->withTitle($this->txt('background_tasks'))
38 ->addNotification(
39 $factory->standard($id('bg_task_bucket'))
40 ->withNotificationItem($item_source->getNotificationItem($nr_buckets))
41 ->withNewAmount(1)
42 );
43
44 return [
45 $group,
46 ];
47 }
Class ilBTPopOverGUI.
$factory
Definition: metadata.php:58

References $factory, ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), and ILIAS\BackgroundTasks\Provider\BTNotificationProvider\txt().

+ Here is the call graph for this function:

◆ txt()

ILIAS\BackgroundTasks\Provider\BTNotificationProvider::txt ( string  $id)
private

Definition at line 50 of file BTNotificationProvider.php.

50 : string
51 {
52 return $this->dic->language()->txt($id);
53 }

Referenced by ILIAS\BackgroundTasks\Provider\BTNotificationProvider\getNotifications().

+ Here is the caller graph for this function:

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