ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider Class Reference

Class ADNProvider. More...

+ Inheritance diagram for ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider:
+ Collaboration diagram for ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider:

Public Member Functions

 __construct (Container $dic)
 @inheritDoc More...
 
 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 (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getNotifications ()
 
 getAdministrativeNotifications ()
 

Protected Member Functions

 getSummary (ilADNNotification|\ActiveRecord $item)
 
- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 

Protected Attributes

MarkdownFormattingToHTML $markdown
 
BasicAccessCheckClosures $access
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Notification\Provider\AbstractNotificationProvider
Container $dic
 
IdentificationProviderInterface $if
 
NotificationFactory $notification_factory
 

Private Member Functions

 handleDenotation (ilADNNotification $item, AdministrativeNotification $adn)
 
 combineClosure (Closure $closure, ?Closure $additional=null)
 

Detailed Description

Class ADNProvider.

Definition at line 36 of file ADNProvider.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ combineClosure()

ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider::combineClosure ( Closure  $closure,
?Closure  $additional = null 
)
private

Definition at line 124 of file ADNProvider.php.

124 : Closure
125 {
126 if ($additional instanceof Closure) {
127 return static fn(): bool => $additional() && $closure();
128 }
129
130 return $closure;
131 }

◆ getNotifications()

ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider::getNotifications ( )

@inheritDoc

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

Definition at line 58 of file ADNProvider.php.

58 : array
59 {
60 return [];
61 }

◆ getSummary()

ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider::getSummary ( ilADNNotification|\ActiveRecord  $item)
protected

Definition at line 48 of file ADNProvider.php.

48 : string
49 {
50 return $this->markdown->toHTML()->transform(
51 $item->getBody()
52 );
53 }

◆ handleDenotation()

ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider::handleDenotation ( ilADNNotification  $item,
AdministrativeNotification  $adn 
)
private

Definition at line 107 of file ADNProvider.php.

110 : AdministrativeNotification {
111 $settype = (static fn(int $type, AdministrativeNotification $adn): AdministrativeNotification => match ($type) {
112 ilADNNotification::TYPE_ERROR => $adn->withBreakingDenotation(),
113 ilADNNotification::TYPE_WARNING => $adn->withImportantDenotation(),
114 default => $adn->withNeutralDenotation(),
115 });
116
117 // denotation during event
118 if (!$item->isPermanent() && $item->isDuringEvent()) {
119 return $settype($item->getTypeDuringEvent(), $adn);
120 }
121 return $settype($item->getType(), $adn);
122 }

References ilADNNotification\TYPE_ERROR, ilADNNotification\TYPE_WARNING, ILIAS\GlobalScreen\Scope\Notification\Factory\AdministrativeNotification\withBreakingDenotation(), ILIAS\GlobalScreen\Scope\Notification\Factory\AdministrativeNotification\withImportantDenotation(), and ILIAS\GlobalScreen\Scope\Notification\Factory\AdministrativeNotification\withNeutralDenotation().

+ Here is the call graph for this function:

Field Documentation

◆ $access

BasicAccessCheckClosures ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider::$access
protected

Definition at line 39 of file ADNProvider.php.

◆ $markdown

MarkdownFormattingToHTML ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider::$markdown
protected

Definition at line 38 of file ADNProvider.php.


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