19 declare(strict_types=1);
39 protected BasicAccessCheckClosures
$access;
44 $this->
access = BasicAccessCheckClosuresSingleton::getInstance();
45 $this->markdown = $dic->refinery()->string()->markdown();
50 return $this->markdown->toHTML()->transform(
67 public function getAdministrativeNotifications(): array
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);
114 default => $adn->withNeutralDenotation(),
121 return $settype($item->
getType(), $adn);
126 if ($additional instanceof
Closure) {
127 return static fn():
bool => $additional() && $closure();
getSummary(ilADNNotification|\ActiveRecord $item)
BasicAccessCheckClosures $access
static hasDimissed(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
Interface IdentificationInterface.
__construct(Container $dic)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
combineClosure(Closure $closure, ?Closure $additional=null)
handleDenotation(ilADNNotification $item, AdministrativeNotification $adn)
MarkdownFormattingToHTML $markdown