Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
dataprovider.php
1<?php
2namespace Bitrix\Main\Filter;
3
4abstract class DataProvider
5{
10 abstract public function getSettings();
15 public function getID()
16 {
17 return $this->getSettings()->getID();
18 }
23 public abstract function prepareFields();
29 public abstract function prepareFieldData($fieldID);
35 public function prepareFieldHtml(Field $field)
36 {
37 return '';
38 }
45 public function prepareListFilterParam(array &$filter, $fieldID)
46 {
47 }
48
55 public function prepareFilterValue(array $rawFilterValue): array
56 {
57 return $rawFilterValue;
58 }
59
66 protected function createField($fieldID, array $params = null)
67 {
68 if(!is_array($params))
69 {
70 $params = [];
71 }
72
73 if(!isset($params['name']))
74 {
75 $params['name'] = $fieldID;
76 }
77
78 return new Field($this, $fieldID, $params);
79 }
80}
prepareFilterValue(array $rawFilterValue)
prepareListFilterParam(array &$filter, $fieldID)
createField($fieldID, array $params=null)