| 1 | <?php |
||
| 7 | trait Checkbox |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Add a checkbox column. |
||
| 11 | * |
||
| 12 | * @param array $attributes |
||
| 13 | * @param bool|int $position true to prepend, false to append or a zero-based index for positioning |
||
| 14 | * @return $this |
||
| 15 | */ |
||
| 16 | public function addCheckbox(array $attributes = [], $position = false) |
||
| 42 | } |
||
| 43 |
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: