1 | <?php |
||
7 | class Editable extends AbstractDisplayer |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | protected $arguments = []; |
||
13 | |||
14 | /** |
||
15 | * Type of editable. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $type = ''; |
||
20 | |||
21 | /** |
||
22 | * Options of editable function. |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $options = [ |
||
27 | 'emptytext' => '<i class="fa fa-pencil"></i>', |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * Add options for editable. |
||
32 | * |
||
33 | * @param array $options |
||
34 | */ |
||
35 | public function addOptions($options = []) |
||
39 | |||
40 | /** |
||
41 | * Text type editable. |
||
42 | */ |
||
43 | public function text() |
||
46 | |||
47 | /** |
||
48 | * Textarea type editable. |
||
49 | */ |
||
50 | public function textarea() |
||
53 | |||
54 | /** |
||
55 | * Select type editable. |
||
56 | * |
||
57 | * @param array $options |
||
58 | */ |
||
59 | public function select($options = []) |
||
76 | |||
77 | /** |
||
78 | * Date type editable. |
||
79 | */ |
||
80 | public function date() |
||
84 | |||
85 | /** |
||
86 | * Datetime type editable. |
||
87 | */ |
||
88 | public function datetime() |
||
92 | |||
93 | /** |
||
94 | * Year type editable. |
||
95 | */ |
||
96 | public function year() |
||
100 | |||
101 | /** |
||
102 | * Month type editable. |
||
103 | */ |
||
104 | public function month() |
||
108 | |||
109 | /** |
||
110 | * Day type editable. |
||
111 | */ |
||
112 | public function day() |
||
116 | |||
117 | /** |
||
118 | * Combodate type editable. |
||
119 | * |
||
120 | * @param string $format |
||
121 | */ |
||
122 | public function combodate($format = 'YYYY-MM-DD') |
||
135 | |||
136 | protected function buildEditableOptions(array $arguments = []) |
||
142 | |||
143 | public function display() |
||
172 | } |
||
173 |