1 | <?php |
||
12 | trait ColReorder |
||
13 | { |
||
14 | /** |
||
15 | * Set colReorder option value. |
||
16 | * Enable and configure the AutoFill extension for DataTables. |
||
17 | * |
||
18 | * @param bool|array $value |
||
19 | * @return $this |
||
20 | * @see https://datatables.net/reference/option/colReorder |
||
21 | */ |
||
22 | public function colReorder($value = true) |
||
28 | |||
29 | /** |
||
30 | * Set colReorder enable option value. |
||
31 | * |
||
32 | * @param bool $value |
||
33 | * @return $this |
||
34 | * @see https://datatables.net/reference/option/colReorder.enable |
||
35 | */ |
||
36 | public function colReorderEnable(bool $value = true) |
||
42 | |||
43 | /** |
||
44 | * Set colReorder fixedColumnsLeft option value. |
||
45 | * |
||
46 | * @param int $value |
||
47 | * @return $this |
||
48 | * @see https://datatables.net/reference/option/colReorder.fixedColumnsLeft |
||
49 | */ |
||
50 | public function colReorderFixedColumnsLeft(int $value = 0) |
||
56 | |||
57 | /** |
||
58 | * Set colReorder fixedColumnsRight option value. |
||
59 | * |
||
60 | * @param int $value |
||
61 | * @return $this |
||
62 | * @see https://datatables.net/reference/option/colReorder.fixedColumnsRight |
||
63 | */ |
||
64 | public function colReorderFixedColumnsRight(int $value = 0) |
||
70 | |||
71 | /** |
||
72 | * Set colReorder order option value. |
||
73 | * |
||
74 | * @param array $value |
||
75 | * @return $this |
||
76 | * @see https://datatables.net/reference/option/colReorder.order |
||
77 | */ |
||
78 | public function colReorderOrder(array $value = []) |
||
84 | |||
85 | /** |
||
86 | * Set colReorder realtime option value. |
||
87 | * |
||
88 | * @param bool $value |
||
89 | * @return $this |
||
90 | * @see https://datatables.net/reference/option/colReorder.realtime |
||
91 | */ |
||
92 | public function colReorderRealtime(bool $value = true) |
||
98 | } |
||
99 |
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: