19 declare(strict_types=1);
37 protected \ILIAS\Refinery\String\MarkdownFormattingToHTML
$markdown;
38 protected \ILIAS\GlobalScreen\Helper\BasicAccessCheckClosures
$access;
43 $this->
access = BasicAccessCheckClosuresSingleton::getInstance();
44 $this->markdown = $dic->refinery()->string()->markdown();
49 return $this->markdown->toHTML()->transform(
65 public function getAdministrativeNotifications(): array
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);
112 return $adn->withBreakingDenotation();
114 return $adn->withImportantDenotation();
117 return $adn->withNeutralDenotation();
125 return $settype($item->
getType(), $adn);
130 if ($additional instanceof
Closure) {
131 return static fn ():
bool => $additional() && $closure();
getSummary(ilADNNotification|\ActiveRecord $item)
static hasDimissed(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
Interface IdentificationInterface.
ILIAS GlobalScreen Helper BasicAccessCheckClosures $access
__construct(Container $dic)
ILIAS Refinery String MarkdownFormattingToHTML $markdown
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
combineClosure(Closure $closure, ?Closure $additional=null)
handleDenotation(ilADNNotification $item, AdministrativeNotification $adn)