Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
departmentdatafilter.php
1
<?php
2
namespace
Bitrix\Im\Integration\UI\EntitySelector
;
3
4
use
Bitrix\UI\EntitySelector\BaseFilter
;
5
use
Bitrix\UI\EntitySelector\Dialog
;
6
use
Bitrix\UI\EntitySelector\Item
;
7
8
class
DepartmentDataFilter
extends
BaseFilter
9
{
10
public
function
__construct
()
11
{
12
parent::__construct();
13
}
14
15
public
function
isAvailable
(): bool
16
{
17
return
$GLOBALS
[
'USER'
]->isAuthorized();
18
}
19
20
public
function
apply
(array $items,
Dialog
$dialog): void
21
{
22
foreach
($items as $item)
23
{
24
if
(!($item instanceof
Item
))
25
{
26
continue
;
27
}
28
29
$itemColor = \Bitrix\Im\Color::getColorByNumber($item->getId());
30
$item->setAvatarOptions([
'color'
=> $itemColor]);
31
}
32
}
33
}
Bitrix\Im\Integration\UI\EntitySelector\DepartmentDataFilter
Definition
departmentdatafilter.php:9
Bitrix\Im\Integration\UI\EntitySelector\DepartmentDataFilter\__construct
__construct()
Definition
departmentdatafilter.php:10
Bitrix\Im\Integration\UI\EntitySelector\DepartmentDataFilter\apply
apply(array $items, Dialog $dialog)
Definition
departmentdatafilter.php:20
Bitrix\Im\Integration\UI\EntitySelector\DepartmentDataFilter\isAvailable
isAvailable()
Definition
departmentdatafilter.php:15
Bitrix\UI\EntitySelector\BaseFilter
Definition
basefilter.php:5
Bitrix\UI\EntitySelector\Dialog
Definition
dialog.php:10
Bitrix\UI\EntitySelector\Item
Definition
item.php:8
Bitrix\Im\Integration\UI\EntitySelector
Definition
botprovider.php:2
Bitrix\Main\$GLOBALS
$GLOBALS['____1444769544']
Definition
license.php:1
modules
im
lib
integration
ui
entityselector
departmentdatafilter.php
Создано системой
1.10.0