| 1 | <?php |
||
| 19 | abstract class Filter extends BaseFilter |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var bool |
||
| 23 | */ |
||
| 24 | protected $active = false; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param ProxyQuery $queryBuilder |
||
| 28 | * @param mixed $value |
||
| 29 | */ |
||
| 30 | public function apply($queryBuilder, $value): void |
||
| 31 | { |
||
| 32 | $this->value = $value; |
||
| 33 | $this->filter($queryBuilder, $queryBuilder->getAlias(), $this->getFieldName(), $value); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | public function isActive() |
||
| 40 | { |
||
| 41 | return $this->active; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Add the where statement for this filter to the query. |
||
| 46 | */ |
||
| 47 | protected function getWhere(ProxyQuery $proxy) |
||
| 56 | } |
||
| 57 |