1 <?php declare(strict_types=1);
48 return $this->
if->identifier($id);
55 $adn = $this->notification_factory->administrative(
$i((
string) $item->getId()))->withTitle($item->getTitle())->withSummary($item->getBody());
58 $is_visible =
static function () :
bool {
63 if ($item->isLimitToRoles()) {
64 $is_visible = $this->
combineClosure($is_visible,
function () use ($item) {
65 return $this->dic->rbac()->review()->isAssignedToAtLeastOneGivenRole($this->dic->user()->getId(),
66 $item->getLimitedToRoleIds());
71 if ($item->getDismissable() && $this->access->isUserLoggedIn()()) {
72 $adn = $adn->withClosedCallable(
function () use ($item) {
73 $item->dismiss($this->dic->user());
75 $is_visible = $this->
combineClosure($is_visible,
function () use ($item) :
bool {
80 $is_visible = $this->
combineClosure($is_visible,
function () use ($item) :
bool {
81 return $item->isVisibleForUser($this->dic->user());
84 $adns[] = $adn->withVisibilityCallable($is_visible);
109 return $settype($item->
getType(), $adn);
115 return static function () use ($closure,
$additional) :
bool {
static hasDimissed(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
Interface AbstractNotificationProvider.
Interface IdentificationInterface.
withImportantDenotation()
Customizing of pimple-DIC for ILIAS.
handleDenotation(ilADNNotification $item, AdministrativeNotification $adn)
Interface NotificationProvider.
__construct(Container $dic)
combineClosure(Closure $closure, ?Closure $additional=null)
__construct(Container $dic, ilPlugin $plugin)
getAdministrativeNotifications()