3 declare(strict_types=1);
37 protected \ILIAS\GlobalScreen\Helper\BasicAccessCheckClosures
$access;
66 $adn = $this->notification_factory->administrative(
$i((
string) $item->getId()))->withTitle($item->getTitle())->withSummary($item->getBody());
69 $is_visible =
static fn ():
bool =>
true;
72 if ($item->isLimitToRoles()) {
73 $is_visible = $this->
combineClosure($is_visible, fn () => $this->dic->rbac()->review()->isAssignedToAtLeastOneGivenRole(
74 $this->dic->user()->getId(),
75 $item->getLimitedToRoleIds()
80 if ($item->getDismissable() && $this->
access->isUserLoggedIn()()) {
81 $adn = $adn->withClosedCallable(
function () use ($item):
void {
82 $item->dismiss($this->dic->user());
87 $is_visible = $this->
combineClosure($is_visible, fn ():
bool => $item->isVisibleForUser($this->dic->user()));
89 $adns[] = $adn->withVisibilityCallable($is_visible);
114 return $settype($item->
getType(), $adn);
120 return static fn ():
bool =>
$additional() && $closure();
static hasDimissed(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
Interface AbstractNotificationProvider.
Interface IdentificationInterface.
withImportantDenotation()
ILIAS GlobalScreen Helper BasicAccessCheckClosures $access
Customizing of pimple-DIC for ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
handleDenotation(ilADNNotification $item, AdministrativeNotification $adn)
__construct(Container $dic)
combineClosure(Closure $closure, ?Closure $additional=null)
__construct(Container $dic, ilPlugin $plugin)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getAdministrativeNotifications()