Total Complexity | 7 |
Total Lines | 78 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
5 | class Text extends BaseColumnFilter |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | protected $view = 'column.filter.text'; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $placeholder; |
||
16 | |||
17 | 3 | /** |
|
18 | * @var bool |
||
19 | 3 | */ |
|
20 | protected $defaultValue = null; |
||
21 | 3 | ||
22 | 3 | public function initialize() |
|
23 | 3 | { |
|
24 | 3 | parent::initialize(); |
|
25 | 3 | ||
26 | $this->setHtmlAttribute('class', 'form-control column-filter'); |
||
27 | $this->setHtmlAttribute('data-type', 'text'); |
||
28 | $this->setHtmlAttribute('type', 'text'); |
||
29 | $this->setHtmlAttribute('placeholder', $this->getPlaceholder()); |
||
30 | 4 | } |
|
31 | |||
32 | 4 | /** |
|
33 | * @return mixed |
||
34 | */ |
||
35 | public function getDefault() |
||
36 | { |
||
37 | return $this->defaultValue; |
||
38 | } |
||
39 | |||
40 | 1 | /** |
|
41 | * @param mixed $value |
||
42 | 1 | * |
|
43 | * @return $this |
||
44 | 1 | */ |
|
45 | public function setDefault($value) |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getPlaceholder() |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @param string $placeholder |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function setPlaceholder($placeholder) |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @return array |
||
74 | */ |
||
75 | public function toArray() |
||
86 |