Total Complexity | 7 |
Total Lines | 78 |
Duplicated Lines | 0 % |
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 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | protected $defaultValue = null; |
||
21 | |||
22 | public function initialize() |
||
23 | { |
||
24 | parent::initialize(); |
||
25 | |||
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 | } |
||
31 | |||
32 | /** |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function getDefault() |
||
36 | { |
||
37 | return $this->defaultValue; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param mixed $value |
||
42 | * |
||
43 | * @return $this |
||
44 | */ |
||
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 |