Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
base.php
1<?php
2
4
7
9{
10 protected function getList($entityTypeId, array $filterSettingsParams, ?array $additionalParams = null)
11 {
12 $result = [];
13 $entityFilter = \Bitrix\Main\Filter\Factory::createEntityFilter(
14 $entityTypeId,
15 $filterSettingsParams,
16 $additionalParams
17 );
18
19 foreach($entityFilter->getFields() as $field)
20 {
21 $result[] = \Bitrix\Main\UI\Filter\FieldAdapter::adapt($field->toArray([
22 'lightweight' => true
23 ]));
24 }
25
26 return $result;
27 }
28
29 protected function getField($entityTypeId, array $filterSettingsParams, $id, ?array $additionalParams = null)
30 {
31 $entityFilter = \Bitrix\Main\Filter\Factory::createEntityFilter(
32 $entityTypeId,
33 $filterSettingsParams,
34 $additionalParams
35 );
36
37 $field = $entityFilter->getField($id);
38 if($field)
39 {
40 $result = \Bitrix\Main\UI\Filter\FieldAdapter::adapt($field->toArray());
41 }
42 else
43 {
44 $this->addError(new Error(Loc::getMessage("MAIN_CONTROLLER_FILTER_FIELD_NOT_FOUND"), "MAIN_CONTROLLER_FILTER_FIELD_NOT_FOUND"));
45 return null;
46 }
47
48 return $result;
49 }
50
51 public function getListAction($filterId, $componentName, $signedParameters)
52 {
53 return [];
54 }
55
56 public function getFieldAction($filterId, $id, $componentName, $signedParameters)
57 {
58 return [];
59 }
60}
61
getListAction($filterId, $componentName, $signedParameters)
Definition base.php:51
getList($entityTypeId, array $filterSettingsParams, ?array $additionalParams=null)
Definition base.php:10
getFieldAction($filterId, $id, $componentName, $signedParameters)
Definition base.php:56
getField($entityTypeId, array $filterSettingsParams, $id, ?array $additionalParams=null)
Definition base.php:29
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29