1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
MemberItem.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Im\V2\Chat\Member;
6
7use Bitrix\Im\V2\Entity\User\UserPopupItem;
8use Bitrix\Im\V2\Rest\PopupData;
9use Bitrix\Im\V2\Rest\PopupDataAggregatable;
10use Bitrix\Im\V2\Rest\RestEntity;
11
13{
14 private int $relationId;
15 private int $userId;
16 private string $role;
17
18 public function __construct(int $relationId, int $userId, string $role)
19 {
20 $this->relationId = $relationId;
21 $this->userId = $userId;
22 $this->role = $role;
23 }
24
25 public function getId(): ?int
26 {
27 return $this->relationId;
28 }
29
30 public function getRole(): string
31 {
32 return $this->role;
33 }
34
35 public function getPopupData(array $excludedList = []): PopupData
36 {
37 return new PopupData([new UserPopupItem([$this->userId])], $excludedList);
38 }
39
40 public static function getRestEntityName(): string
41 {
42 return 'member';
43 }
44
45 public function toRestFormat(array $option = []): ?array
46 {
47 return [
48 'relationId' => $this->relationId,
49 'userId' => $this->userId,
50 'role' => mb_strtolower($this->role),
51 ];
52 }
53}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getRestEntityName()
Определения MemberItem.php:40
toRestFormat(array $option=[])
Определения MemberItem.php:45
__construct(int $relationId, int $userId, string $role)
Определения MemberItem.php:18
getPopupData(array $excludedList=[])
Определения MemberItem.php:35
</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