ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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)
 
 getNotifications ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Notification\Provider\AbstractNotificationProvider
 __construct (Container $dic)
 
 getAdministrativeNotifications ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

Protected Member Functions

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

Protected Attributes

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

Private Member Functions

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

Detailed Description

Class ADNProvider.

Definition at line 35 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 128 of file ADNProvider.php.

Referenced by ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider\getNotifications().

128  : Closure
129  {
130  if ($additional instanceof Closure) {
131  return static fn (): bool => $additional() && $closure();
132  }
133 
134  return $closure;
135  }
+ Here is the caller graph for this function:

◆ getNotifications()

◆ getSummary()

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

Definition at line 47 of file ADNProvider.php.

Referenced by ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider\getNotifications().

47  : string
48  {
49  return $this->markdown->toHTML()->transform(
50  $item->getBody()
51  );
52  }
+ Here is the caller graph for this function:

◆ handleDenotation()

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

Definition at line 105 of file ADNProvider.php.

References ilADNNotification\getType(), ilADNNotification\getTypeDuringEvent(), ilADNNotification\isDuringEvent(), ilADNNotification\isPermanent(), ilADNNotification\TYPE_ERROR, ilADNNotification\TYPE_INFO, 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().

Referenced by ILIAS\AdministrativeNotification\GlobalScreen\ADNProvider\getNotifications().

108  : AdministrativeNotification {
109  $settype = static function (int $type, AdministrativeNotification $adn): AdministrativeNotification {
110  switch ($type) {
112  return $adn->withBreakingDenotation();
114  return $adn->withImportantDenotation();
116  default:
117  return $adn->withNeutralDenotation();
118  }
119  };
120 
121  // denotation during event
122  if (!$item->isPermanent() && $item->isDuringEvent()) {
123  return $settype($item->getTypeDuringEvent(), $adn);
124  }
125  return $settype($item->getType(), $adn);
126  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

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

Definition at line 38 of file ADNProvider.php.

◆ $markdown

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

Definition at line 37 of file ADNProvider.php.


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