Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
abstractfield.php
1<?php
9
10use Bitrix\Main\UI\Filter\Options as FilterOptions;
11
16abstract class AbstractField
17{
19 protected $data;
20
27 public static function create(array $data)
28 {
29 return new static($data);
30 }
31
37 public function __construct(array $data)
38 {
39 $this->data = $data;
40 }
41
47 public function getId()
48 {
49 return $this->data['id'];
50 }
51
57 public function getFilterKey()
58 {
59 return $this->data['filter-key'];
60 }
61
68 public function getValue($defaultValue = null)
69 {
70 return isset($this->data['value']) ? $this->data['value'] : $defaultValue;
71 }
72
79 abstract public function applyFilter(array &$filter = array());
80}