3declare(strict_types=1);
68 $this->disableAfterDelivery = $value;
94 $this->iconPath =
$path;
105 public function setTitleVar(
string $name, array $parameters = [],
string $language_module =
'notification'): void
112 return $this->title->getName();
125 return $this->short_description->getName();
138 return $this->long_description->getName();
152 foreach ($this->links as
$id => $link) {
161 $this->validForSeconds = $seconds;
201 final public function notifyByUsers(array $recipients,
bool $processAsync =
false): void
218 final public function notifyByRoles(array $roles,
bool $processAsync =
false): void
228 if (isset($languageVars[$this->title->getName()])) {
229 $var = $languageVars[$this->title->getName()]->lang;
236 $notificationObject->title =
$title;
238 $short = $this->short_description->
getName();
239 if (isset($languageVars[$this->short_description->getName()])) {
240 $var = $languageVars[$this->short_description->getName()]->lang;
247 $notificationObject->shortDescription = $short;
249 $long = $this->long_description->getName();
250 if (isset($languageVars[$this->long_description->getName()])) {
251 $var = $languageVars[$this->long_description->getName()]->lang;
258 $notificationObject->longDescription = $long;
261 foreach ($this->links as $link) {
262 $link_title = $link->getTitle()->getName();
263 if (isset($languageVars[$link->getTitle()->getName()])) {
264 $var = $languageVars[$link->getTitle()->getName()]->lang;
272 $process_link = clone $link;
273 $process_link->setTitle($link_title);
274 $process_links[] = $process_link;
276 $notificationObject->links = $process_links;
280 return $notificationObject;
285 if (strpos(
$name,
'.')) {
286 $nsParts = explode(
'.',
$name, 2);
288 $field = $nsParts[1];
289 $this->handlerParams[$ns][$field] = $value;
291 $this->handlerParams[
''][
$name] = $value;
302 unset($this->handlerParams[
$name]);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
hasDisableAfterDeliverySet()
setTitleVar(string $name, array $parameters=[], string $language_module='notification')
setIconPath(string $path)
ilNotificationParameter $title
notifyByUsers(array $recipients, bool $processAsync=false)
setVisibleForSeconds(int $visibleForSeconds)
setAutoDisable(bool $value)
NotificationIdentification $identification
ilNotificationParameter $long_description
notifyByListeners(int $ref_id, $processAsync=false)
bool $disableAfterDelivery
setIdentification(NotificationIdentification $identification)
getUserInstance(ilObjUser $user, array $languageVars, string $defaultLanguage)
notifyByRoles(array $roles, bool $processAsync=false)
setLongDescriptionVar(string $name, array $parameters=[], string $language_module='notification')
unsetHandlerParam(string $name)
__construct(string $provider, ?NotificationIdentification $identification=null)
setShortDescriptionVar(string $name, array $parameters=[], string $language_module='notification')
setHandlerParam(string $name, string $value)
ilNotificationParameter $short_description
setValidForSeconds(int $seconds)
description of a localized parameter this information is used locate translations while processing no...
static sendNotificationToUsers(ilNotificationConfig $notification, array $users, bool $processAsync=false)
static sendNotificationToRoles(ilNotificationConfig $notification, array $roles, bool $processAsync=false)
static sendNotificationToListeners(ilNotificationConfig $notification, int $ref_id, bool $processAsync=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...