Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
basefilter.php
1<?php
3
4abstract class BaseFilter
5{
6 protected $options = [];
7
8 protected function __construct()
9 {
10 // You have to validate $options in a derived class constructor
11 }
12
13 abstract public function isAvailable(): bool;
14
19 abstract public function apply(array $items, Dialog $dialog): void;
20
21 public function getOptions(): array
22 {
23 return $this->options;
24 }
25
26 public function getOption(string $option, $defaultValue = null)
27 {
28 return array_key_exists($option, $this->options) ? $this->options[$option] : $defaultValue;
29 }
30}
apply(array $items, Dialog $dialog)
getOption(string $option, $defaultValue=null)