1 | <?php |
||
13 | trait Select |
||
14 | { |
||
15 | /** |
||
16 | * Set select option value. |
||
17 | * |
||
18 | * @param bool|array $value |
||
19 | * @return $this |
||
20 | * @see https://datatables.net/reference/option/select |
||
21 | */ |
||
22 | public function select($value = true) |
||
28 | |||
29 | /** |
||
30 | * Set select blurable option value. |
||
31 | * |
||
32 | * @param bool $value |
||
33 | * @return $this |
||
34 | * @see https://datatables.net/reference/option/select.blurable |
||
35 | */ |
||
36 | public function selectBlurable(bool $value = true) |
||
42 | |||
43 | /** |
||
44 | * Set select className option value. |
||
45 | * |
||
46 | * @param string $value |
||
47 | * @return $this |
||
48 | * @see https://datatables.net/reference/option/select.className |
||
49 | */ |
||
50 | public function selectClassName($value = 'selected') |
||
56 | |||
57 | /** |
||
58 | * Set select info option value. |
||
59 | * |
||
60 | * @param bool $value |
||
61 | * @return $this |
||
62 | * @see https://datatables.net/reference/option/select.info |
||
63 | */ |
||
64 | public function selectInfo(bool $value = true) |
||
70 | |||
71 | /** |
||
72 | * Set select items option value. |
||
73 | * |
||
74 | * @param string $value |
||
75 | * @return $this |
||
76 | * @see https://datatables.net/reference/option/select.items |
||
77 | */ |
||
78 | public function selectItems($value = 'row') |
||
84 | |||
85 | /** |
||
86 | * Set select items option value to row. |
||
87 | * |
||
88 | * @return $this |
||
89 | * @see https://datatables.net/reference/option/select.items |
||
90 | */ |
||
91 | public function selectItemsRow() |
||
97 | |||
98 | /** |
||
99 | * Set select items option value to column. |
||
100 | * |
||
101 | * @return $this |
||
102 | * @see https://datatables.net/reference/option/select.items |
||
103 | */ |
||
104 | public function selectItemsColumn() |
||
110 | |||
111 | /** |
||
112 | * Set select items option value to cell. |
||
113 | * |
||
114 | * @return $this |
||
115 | * @see https://datatables.net/reference/option/select.items |
||
116 | */ |
||
117 | public function selectItemsCell() |
||
123 | |||
124 | /** |
||
125 | * Set select selector option value. |
||
126 | * |
||
127 | * @param string $value |
||
128 | * @return $this |
||
129 | * @see https://datatables.net/reference/option/select.selector |
||
130 | */ |
||
131 | public function selectSelector($value = 'td') |
||
137 | |||
138 | /** |
||
139 | * Set select style option value. |
||
140 | * |
||
141 | * @param string $value |
||
142 | * @return $this |
||
143 | * @see https://datatables.net/reference/option/select.style |
||
144 | */ |
||
145 | public function selectStyle($value = 'os') |
||
151 | |||
152 | /** |
||
153 | * Set select style option value to api. |
||
154 | * |
||
155 | * @return $this |
||
156 | * @see https://datatables.net/reference/option/select.style |
||
157 | */ |
||
158 | public function selectStyleApi() |
||
164 | |||
165 | /** |
||
166 | * Set select style option value to single. |
||
167 | * |
||
168 | * @return $this |
||
169 | * @see https://datatables.net/reference/option/select.style |
||
170 | */ |
||
171 | public function selectStyleSingle() |
||
177 | |||
178 | /** |
||
179 | * Set select style option value to multi. |
||
180 | * |
||
181 | * @return $this |
||
182 | * @see https://datatables.net/reference/option/select.style |
||
183 | */ |
||
184 | public function selectStyleMulti() |
||
190 | |||
191 | /** |
||
192 | * Set select style option value to os. |
||
193 | * |
||
194 | * @return $this |
||
195 | * @see https://datatables.net/reference/option/select.style |
||
196 | */ |
||
197 | public function selectStyleOS() |
||
203 | |||
204 | /** |
||
205 | * Set select style option value to multi+shift. |
||
206 | * |
||
207 | * @return $this |
||
208 | * @see https://datatables.net/reference/option/select.style |
||
209 | */ |
||
210 | public function selectStyleMultiShift() |
||
216 | } |
||
217 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: