1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ReactionPopupItem.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Message\Reaction;
4
5use Bitrix\Im\V2\Rest\PopupData;
6use Bitrix\Im\V2\Rest\PopupDataAggregatable;
7use Bitrix\Im\V2\Rest\PopupDataItem;
8
10{
11 private ReactionMessages $reactions;
12
16 public function __construct($reactions = null)
17 {
18 $reactions ??= new ReactionMessages([], false);
19
20 if ($reactions instanceof ReactionMessages)
21 {
22 $this->reactions = $reactions;
23 }
24 if ($reactions instanceof ReactionMessage)
25 {
26 $this->reactions = ReactionMessages::initFromArray([$reactions]);
27 }
28 }
29
30 public function merge(PopupDataItem $item): self
31 {
32 if ($item instanceof self)
33 {
34 foreach ($item->reactions as $reaction)
35 {
36 $this->reactions->addReactionMessage($reaction);
37 }
38 }
39
40 return $this;
41 }
42
43 public static function getRestEntityName(): string
44 {
45 return 'reactions';
46 }
47
48 public function toRestFormat(array $option = []): array
49 {
50 return $this->reactions->toRestFormat($option);
51 }
52
53 public function getPopupData(array $excludedList = []): PopupData
54 {
55 return $this->reactions->getPopupData($excludedList);
56 }
57}
static initFromArray(array $reactionArray, bool $withOwnReactions=true)
Определения ReactionMessages.php:39
getPopupData(array $excludedList=[])
Определения ReactionPopupItem.php:53
</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