1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
FilePopupItem.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Entity\File;
4
5use Bitrix\Im\V2\Rest\PopupData;
6use Bitrix\Im\V2\Rest\PopupDataAggregatable;
7use Bitrix\Im\V2\Rest\PopupDataItem;
8
10{
11 private FileCollection $files;
12
13 public function __construct($files = null)
14 {
15 if (!$files instanceof FileCollection)
16 {
17 $this->files = new FileCollection();
18 }
19 else
20 {
21 $this->files = $files;
22 }
23
24 if ($files instanceof FileItem)
25 {
26 if ($this->files->getById($files->getId()) === null)
27 {
28 $this->files[] = $files;
29 }
30 }
31 }
32
33 public function merge(PopupDataItem $item): self
34 {
35 if ($item instanceof self)
36 {
37 foreach ($item->files as $file)
38 {
39 if ($this->files->getById($file->getId()) === null)
40 {
41 $this->files[] = $file;
42 }
43 }
44 }
45
46 return $this;
47 }
48
49 public static function getRestEntityName(): string
50 {
52 }
53
54 public function toRestFormat(array $option = []): array
55 {
56 return $this->files->getUnique()->toRestFormat($option);
57 }
58
59 public function getPopupData(array $excludedList = []): PopupData
60 {
61 return $this->files->getPopupData($excludedList);
62 }
63}
toRestFormat(array $option=[])
Определения FilePopupItem.php:54
getPopupData(array $excludedList=[])
Определения FilePopupItem.php:59
__construct($files=null)
Определения FilePopupItem.php:13
merge(PopupDataItem $item)
Определения FilePopupItem.php:33
</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