1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
UserPopupItem.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Entity\User;
4
5
use Bitrix\Im\V2\Rest\PopupDataItem;
6
7
class
UserPopupItem
implements
PopupDataItem
8
{
12
private
array
$userIds;
13
14
public
function
__construct
(
array
$userIds = [])
15
{
16
$this->userIds = array_unique($userIds);
17
$this->userIds = array_filter($this->userIds, fn(
$userId
) =>
$userId
> 0);
18
}
19
20
public
function
merge
(
PopupDataItem
$item): self
21
{
22
if
($item instanceof
self
)
23
{
24
$this->userIds = array_unique(array_merge($this->userIds, $item->userIds));
25
}
26
27
return
$this;
28
}
29
30
public
static
function
getRestEntityName
(): string
31
{
32
return
UserCollection::getRestEntityName
();
33
}
34
35
public
function
toRestFormat
(
array
$option
= []):
array
36
{
37
return
(
new
UserCollection
(array_unique($this->userIds)))->getUnique()->toRestFormat(
$option
);
38
}
39
}
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Im\V2\Entity\User\UserCollection
Определения
UserCollection.php:17
Bitrix\Im\V2\Entity\User\UserCollection\getRestEntityName
static getRestEntityName()
Определения
UserCollection.php:106
Bitrix\Im\V2\Entity\User\UserPopupItem
Определения
UserPopupItem.php:8
Bitrix\Im\V2\Entity\User\UserPopupItem\getRestEntityName
static getRestEntityName()
Определения
UserPopupItem.php:30
Bitrix\Im\V2\Entity\User\UserPopupItem\toRestFormat
toRestFormat(array $option=[])
Определения
UserPopupItem.php:35
Bitrix\Im\V2\Entity\User\UserPopupItem\__construct
__construct(array $userIds=[])
Определения
UserPopupItem.php:14
Bitrix\Im\V2\Entity\User\UserPopupItem\merge
merge(PopupDataItem $item)
Определения
UserPopupItem.php:20
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Im\V2\Rest\PopupDataItem
Определения
PopupDataItem.php:6
$option
$option
Определения
options.php:1711
bitrix
modules
im
lib
V2
Entity
User
UserPopupItem.php
Создано системой
1.14.0