83 return date(self::DATE_FORMAT, $this->
getEventEnd()) .
', ' . date(
89 return date(self::DATE_TIME_FORMAT, $this->
getEventStart()) .
' - ' . date(
90 self::DATE_TIME_FORMAT,
126 return ($hasEventStarted || $hasDisplayStarted)
127 && ($hasEventEnded || $hasDisplayEnded);
132 if ($ilObjUser->
getId() === 0 && $this->interruptive) {
156 return $DIC->rbac()->review()->isAssignedToAtLeastOneGivenRole(
158 $this->getLimitedToRoleIds()
170 protected ?
int $id =
null;
314 public function wakeUp($field_name, $field_value)
316 switch ($field_name) {
320 case 'display_start':
323 return (
new DateTimeImmutable())->setTimestamp((
int) $field_value);
325 case 'allowed_users':
326 if ($field_value ===
null) {
329 $json_decode = json_decode($field_value,
true);
330 if (!is_array($json_decode)) {
333 $array_unique = array_unique($json_decode);
338 return $array_unique;
339 case 'limited_to_role_ids':
340 return json_decode($field_value,
true);
348 public function sleep($field_name)
350 switch ($field_name) {
354 case 'display_start':
360 $datetime = $this->{$field_name} ??
new DateTimeImmutable();
361 return $datetime->getTimestamp();
362 case 'allowed_users':
364 foreach ($this->allowed_users as $user_id) {
368 return json_encode(array_unique(
$allowed_users), JSON_THROW_ON_ERROR);
369 case 'limited_to_role_ids':
370 return json_encode($this->{$field_name}, JSON_THROW_ON_ERROR);
399 return $this->display_end ??
new DateTimeImmutable();
409 return $this->display_start ??
new DateTimeImmutable();
419 return $this->event_end ??
new DateTimeImmutable();
429 return $this->event_start ??
new DateTimeImmutable();
470 $this->type_during_event,
471 [self::TYPE_WARNING, self::TYPE_ERROR, self::TYPE_INFO]
527 return $this->create_date ??
new DateTimeImmutable();
540 protected function getTime(): DateTimeImmutable
542 return new DateTimeImmutable();
static where($where, $operator=null)
static dismiss(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
static hasDimissed(ilObjUser $ilObjUser, ilADNNotification $ilADNNotification)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
int $link_type
@con_has_field true @con_fieldtype integer @con_length 1
static returnDbTableName()
string $link_target
@con_has_field true @con_fieldtype text @con_length 256
setCreateDate(DateTimeImmutable $create_date)
int $type_during_event
@con_has_field true @con_fieldtype integer @con_length 1
setEventEnd(DateTimeImmutable $event_end)
bool $active
@con_has_field true @con_fieldtype integer @con_length 1
DateTimeImmutable $event_start
@con_has_field true @con_fieldtype integer @con_length 8
DateTimeImmutable $create_date
@con_has_field true @con_fieldtype integer @con_length 8
bool $interruptive
@con_has_field true @con_fieldtype integer @con_length 1
hasUserDismissed(ilObjUser $ilObjUser)
int $type
@con_has_field true @con_fieldtype integer @con_length 1
string $link
@con_has_field true @con_fieldtype text @con_length 256
DateTimeImmutable $display_end
@con_has_field true @con_fieldtype integer @con_length 8
static array $allowed_user_ids
array $limited_to_role_ids
@con_has_field true @con_fieldtype text @con_length 256
getConnectorContainerName()
@description Return the Name of your Connector Table
DateTimeImmutable $display_start
@con_has_field true @con_fieldtype integer @con_length 8
bool $limit_to_roles
@con_has_field true @con_fieldtype integer @con_length 1
bool $permanent
@con_has_field true @con_fieldtype integer @con_length 1
int $created_by
@con_has_field true @con_fieldtype integer @con_length 8
DateTimeImmutable $event_end
@con_has_field true @con_fieldtype integer @con_length 8
string $body
@con_has_field true @con_fieldtype clob
dismiss(ilObjUser $ilObjUser)
setPermanent(bool $permanent)
array $allowed_users
@con_has_field true @con_fieldtype text @con_length 256
DateTimeImmutable $last_update
@con_has_field true @con_fieldtype integer @con_length 8
isVisibleForUser(ilObjUser $ilObjUser)
string $title
@con_has_field true @con_fieldtype text @con_length 256
setDismissable(bool $dismissable)
setCreatedBy(int $created_by)
setLimitToRoles(bool $limit_to_roles)
setDisplayStart(DateTimeImmutable $display_start)
isVisibleRoleUserRoles(ilObjUser $ilObjUser)
int $id
@con_is_primary true @con_sequence true @con_is_unique true @con_has_field true @con_fieldtype intege...
setEventStart(DateTimeImmutable $event_start)
setDisplayEnd(DateTimeImmutable $display_end)
bool $dismissable
@con_has_field true @con_fieldtype integer @con_length 1
int $last_update_by
@con_has_field true @con_fieldtype integer @con_length 8
setTypeDuringEvent(int $type_during_event)
setLimitedToRoleIds(array $limited_to_role_ids)
int $parent_id
@con_has_field true @con_fieldtype integer @con_length 8
wakeUp($field_name, $field_value)
isUserAllowedToDismiss(ilObjUser $user)