Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
destselectorfield.php
1
<?php
8
namespace
Bitrix\Sender\Connector\Filter
;
9
14
class
DestSelectorField
extends
AbstractField
15
{
22
public
function
applyFilter
(array &$filter = array())
23
{
24
$filterKey = $this->
getFilterKey
();
25
$filter[$filterKey] = $this->
getValue
();
26
$data
= $this->getData();
27
$data
[
'id'
] = $filterKey;
28
\Bitrix\Crm\UI\Filter\EntityHandler::internalize([
$data
], $filter);
29
}
30
37
public
function
fetchFieldValue
($filterFields)
38
{
39
$id = $this->
getId
();
40
$value = $filterFields[$id] ??
false
;
41
if
(!array_key_exists($id .
'_label'
, $filterFields))
42
{
43
return
$value ? [$id => $value] : [];
44
}
45
$label = $filterFields[$id .
'_label'
];
46
47
if
(!$value || !$label)
48
return
[];
49
50
return
[
51
'_value'
=> $value,
52
'_label'
=> $label
53
];
54
}
55
56
private
function
getData()
57
{
58
return
$this->data
;
59
}
60
}
Bitrix\Sender\Connector\Filter\AbstractField
Definition
abstractfield.php:17
Bitrix\Sender\Connector\Filter\AbstractField\getId
getId()
Definition
abstractfield.php:47
Bitrix\Sender\Connector\Filter\AbstractField\$data
$data
Definition
abstractfield.php:19
Bitrix\Sender\Connector\Filter\AbstractField\getValue
getValue($defaultValue=null)
Definition
abstractfield.php:68
Bitrix\Sender\Connector\Filter\AbstractField\getFilterKey
getFilterKey()
Definition
abstractfield.php:57
Bitrix\Sender\Connector\Filter\DestSelectorField
Definition
destselectorfield.php:15
Bitrix\Sender\Connector\Filter\DestSelectorField\fetchFieldValue
fetchFieldValue($filterFields)
Definition
destselectorfield.php:37
Bitrix\Sender\Connector\Filter\DestSelectorField\applyFilter
applyFilter(array &$filter=array())
Definition
destselectorfield.php:22
Bitrix\Sender\Connector\Filter
Definition
abstractfield.php:8
modules
sender
lib
connector
filter
destselectorfield.php
Создано системой
1.10.0