1 | <?php |
||
9 | class Select extends BaseInput |
||
10 | { |
||
11 | |||
12 | 6 | protected function getDefaultSpecs() |
|
13 | { |
||
14 | return array( |
||
15 | 6 | Specs::WIDGET => 'select' |
|
16 | 6 | ); |
|
17 | } |
||
18 | |||
19 | /** |
||
20 | * Sets the options for elements like selects, radio buttons, checkboxes |
||
21 | * |
||
22 | * @param array $options |
||
23 | * |
||
24 | * @return $this |
||
25 | */ |
||
26 | 7 | public function setOptions($options = array()) |
|
27 | { |
||
28 | 7 | $this[Specs::OPTIONS] = $options; |
|
29 | |||
30 | 7 | return $this; |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * Retrieves the options for selects, radio button, checkboxes |
||
35 | * |
||
36 | * @return array |
||
37 | */ |
||
38 | 2 | public function getOptions() |
|
42 | |||
43 | /** |
||
44 | * Sets the first option for SELECT widgets |
||
45 | * |
||
46 | * @param null $firstOption |
||
47 | * |
||
48 | * @return $this |
||
49 | */ |
||
50 | 1 | public function setFirstOption($firstOption = null) |
|
51 | { |
||
52 | 1 | $this[Specs::FIRST_OPTION] = $firstOption; |
|
53 | |||
54 | 1 | return $this; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Retrieve the first option for SELECT widgets |
||
59 | * @return null |
||
60 | */ |
||
61 | 1 | public function getFirstOption() |
|
65 | |||
66 | 2 | protected function prepareFiltrator(InputFilter $input) |
|
67 | { |
||
68 | 2 | parent::prepareFiltrator($input); |
|
78 | |||
79 | /** |
||
80 | * Filters out the input value if it is not in the options set |
||
81 | * |
||
82 | * @param mixed $value |
||
83 | * @param null|string $valueIdentifier |
||
84 | * |
||
85 | * @return mixed |
||
86 | */ |
||
87 | 1 | public function filterValue($value, $valueIdentifier = null) |
|
99 | } |
||
100 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.