| @@ 128-139 (lines=12) @@ | ||
| 125 | * @param array $buttons |
|
| 126 | * @return $this |
|
| 127 | */ |
|
| 128 | public function buttons(array $buttons) |
|
| 129 | { |
|
| 130 | foreach ($buttons as $key => $button) { |
|
| 131 | if ($button instanceof Arrayable) { |
|
| 132 | $buttons[$key] = $button->toArray(); |
|
| 133 | } |
|
| 134 | } |
|
| 135 | ||
| 136 | $this->attributes['buttons'] = $buttons; |
|
| 137 | ||
| 138 | return $this; |
|
| 139 | } |
|
| 140 | ||
| 141 | /** |
|
| 142 | * @param array $buttons |
|
| @@ 146-157 (lines=12) @@ | ||
| 143 | * @return $this |
|
| 144 | * @see https://editor.datatables.net/examples/api/cancelButton |
|
| 145 | */ |
|
| 146 | public function formButtons(array $buttons) |
|
| 147 | { |
|
| 148 | foreach ($buttons as $key => $button) { |
|
| 149 | if ($button instanceof Arrayable) { |
|
| 150 | $buttons[$key] = $button->toArray(); |
|
| 151 | } |
|
| 152 | } |
|
| 153 | ||
| 154 | $this->attributes['formButtons'] = $buttons; |
|
| 155 | ||
| 156 | return $this; |
|
| 157 | } |
|
| 158 | ||
| 159 | /** |
|
| 160 | * Set className option value. |
|