19 declare(strict_types=1);
37 protected \ILIAS\Refinery\String\MarkdownFormattingToHTML
$markdown;
38 protected \ILIAS\GlobalScreen\Helper\BasicAccessCheckClosures
$access;
44 $this->markdown = $dic->
refinery()->string()->markdown();
49 return $this->markdown->toHTML()->transform(
75 $adn = $this->notification_factory->administrative($i((
string) $item->getId()))->withTitle($item->getTitle())->withSummary(
80 $is_visible =
static fn ():
bool =>
true;
83 if ($item->isLimitToRoles()) {
84 $is_visible = $this->
combineClosure($is_visible, fn () => $this->dic->rbac()->review()->isAssignedToAtLeastOneGivenRole(
85 $this->dic->user()->getId(),
86 $item->getLimitedToRoleIds()
91 if ($item->getDismissable() && $this->
access->isUserLoggedIn()()) {
92 $adn = $adn->withClosedCallable(
function () use ($item):
void {
93 $item->dismiss($this->dic->user());
98 $is_visible = $this->
combineClosure($is_visible, fn ():
bool => $item->isVisibleForUser($this->dic->user()));
100 $adns[] = $adn->withVisibilityCallable($is_visible);
125 return $settype($item->
getType(), $adn);
130 if ($additional instanceof
Closure) {
131 return static fn ():
bool => $additional() && $closure();
static hasDimissed(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
Interface AbstractNotificationProvider.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface IdentificationInterface.
withImportantDenotation()
ILIAS GlobalScreen Helper BasicAccessCheckClosures $access
Customizing of pimple-DIC for ILIAS.
handleDenotation(ilADNNotification $item, AdministrativeNotification $adn)
__construct(Container $dic)
combineClosure(Closure $closure, ?Closure $additional=null)
getSummary(ilADNNotification|\ActiveRecord $item)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getAdministrativeNotifications()
ILIAS Refinery String MarkdownFormattingToHTML $markdown