19declare(strict_types=1);
45 $this->markdown =
$dic->
refinery()->string()->markdown();
50 return $this->markdown->toHTML()->transform(
77 $adn = $this->notification_factory->administrative($i((
string) $item->getId()))->withTitle($item->getTitle())->withSummary(
82 $is_visible =
static fn(): bool =>
true;
85 if ($item->isLimitToRoles()) {
86 $is_visible = $this->
combineClosure($is_visible, fn():
bool => $this->dic->rbac()->review()->isAssignedToAtLeastOneGivenRole(
87 $this->dic->user()->getId(),
88 $item->getLimitedToRoleIds()
93 if ($item->getDismissable() && $this->access->isUserLoggedIn()()) {
94 $adn = $adn->withClosedCallable(
function () use ($item):
void {
95 $item->dismiss($this->dic->user());
100 $is_visible = $this->
combineClosure($is_visible, fn():
bool => $item->isVisibleForUser($this->dic->user()));
102 $adns[] = $adn->withVisibilityCallable($is_visible);
118 if (!$item->isPermanent() && $item->isDuringEvent()) {
119 return $settype($item->getTypeDuringEvent(), $adn);
121 return $settype($item->getType(), $adn);
124 private function combineClosure(Closure $closure, ?Closure $additional =
null): Closure
126 if ($additional instanceof Closure) {
127 return static fn():
bool => $additional() && $closure();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
handleDenotation(ilADNNotification $item, AdministrativeNotification $adn)
getNotifications()
@inheritDoc
BasicAccessCheckClosures $access
__construct(Container $dic)
@inheritDoc
MarkdownFormattingToHTML $markdown
combineClosure(Closure $closure, ?Closure $additional=null)
getSummary(ilADNNotification|\ActiveRecord $item)
Customizing of pimple-DIC for ILIAS.
Class BasicAccessCheckClosuresSingleton.
Class BasicAccessCheckClosures.
withImportantDenotation()
Interface AbstractNotificationProvider.
getAdministrativeNotifications()
@inheritDoc
static hasDimissed(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface IdentificationInterface.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))