Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function init(): void |
||
27 | { |
||
28 | parent::init(); |
||
29 | |||
30 | $conditionBuilders = [ |
||
31 | 'LIKE LOWER' => function (string $operator, $condition, string $attribute) { |
||
32 | return ['LIKE', "LOWER($attribute)", new Expression("LOWER('$condition')"), false]; |
||
33 | }, |
||
34 | ]; |
||
35 | |||
36 | $filterControls = [ |
||
37 | 'like lower' => 'LIKE LOWER', |
||
38 | ]; |
||
39 | |||
40 | $operatorTypes = [ |
||
41 | 'LIKE LOWER' => [DataFilter::TYPE_STRING], |
||
42 | ]; |
||
43 | |||
44 | $this->conditionBuilders = array_merge($this->conditionBuilders, $conditionBuilders); |
||
45 | $this->filterControls = array_merge($this->filterControls, $filterControls); |
||
46 | $this->operatorTypes = array_merge($this->operatorTypes, $operatorTypes); |
||
47 | } |
||
49 |