1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ReminderPopupItem.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Link\Reminder;
4
5use Bitrix\Im\V2\Rest\PopupDataItem;
6
8{
9 // todo refactor this. replace with lazy load
10 private ReminderCollection $reminders;
11
12 public function __construct($reminders = null)
13 {
14 if (!$reminders instanceof ReminderCollection)
15 {
16 $this->reminders = new ReminderCollection();
17 }
18 else
19 {
20 $this->reminders = $reminders;
21 }
22
23 if ($reminders instanceof ReminderItem)
24 {
25 if ($this->reminders[$reminders->getId()] === null)
26 {
27 $this->reminders->add($reminders);
28 }
29 }
30 }
31
32 public function merge(PopupDataItem $item): self
33 {
34 if ($item instanceof self)
35 {
36 foreach ($item->reminders as $reminder)
37 {
38 if (!isset($this->reminders[$reminder->getId()]))
39 {
40 $this->reminders->add($reminder);
41 }
42 }
43 }
44
45 return $this;
46 }
47
48 public static function getRestEntityName(): string
49 {
50 return 'reminders';
51 }
52
53 public function toRestFormat(array $option = []): array
54 {
55 $option['WITHOUT_MESSAGES'] = 'Y';
56 return $this->reminders->toRestFormat($option);
57 }
58}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$option
Определения options.php:1711
$reminder
Определения options.php:2415