Total Complexity | 4 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class Timepicker extends Temporalpicker |
||
7 | { |
||
8 | /** |
||
9 | * Block type. |
||
10 | * |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $type = 'timepicker'; |
||
14 | |||
15 | /** |
||
16 | * Internal attribute to property map. |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | protected static $availableAttributes = [ |
||
21 | 'action_id' => 'action_id', |
||
22 | 'placeholder' => 'placeholder', |
||
23 | 'initial_time' => 'initial_value', |
||
24 | 'confirm' => 'confirm', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * Get the name of the initial value field. |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | 1 | public function getInitialValueField() |
|
33 | { |
||
34 | 1 | return 'initial_time'; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * Get the initial value format. |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 1 | public function getInitialValueFormat() |
|
43 | { |
||
44 | 1 | return 'H:i'; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * Get the initial time. |
||
49 | * |
||
50 | * @return \DateTime |
||
51 | */ |
||
52 | 2 | public function getInitialTime() |
|
53 | { |
||
54 | 2 | return $this->getInitialValue(); |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Set the initial time. |
||
59 | * |
||
60 | * @param \DateTime $initialTime |
||
61 | * |
||
62 | * @return $this |
||
63 | */ |
||
64 | 1 | public function setInitialTime(DateTime $initialTime) |
|
67 | } |
||
68 | } |
||
69 |