@@ 166-177 (lines=12) @@ | ||
163 | * @return $this |
|
164 | * @see https://datatables.net/reference/option/buttons.buttons |
|
165 | */ |
|
166 | public function buttons(array $buttons) |
|
167 | { |
|
168 | foreach ($buttons as $key => $button) { |
|
169 | if ($button instanceof Arrayable) { |
|
170 | $buttons[$key] = $button->toArray(); |
|
171 | } |
|
172 | } |
|
173 | ||
174 | $this->attributes['buttons'] = $buttons; |
|
175 | ||
176 | return $this; |
|
177 | } |
|
178 | ||
179 | /** |
|
180 | * @param array $buttons |
|
@@ 184-195 (lines=12) @@ | ||
181 | * @return $this |
|
182 | * @see https://editor.datatables.net/examples/api/cancelButton |
|
183 | */ |
|
184 | public function formButtons(array $buttons) |
|
185 | { |
|
186 | foreach ($buttons as $key => $button) { |
|
187 | if ($button instanceof Arrayable) { |
|
188 | $buttons[$key] = $button->toArray(); |
|
189 | } |
|
190 | } |
|
191 | ||
192 | $this->attributes['formButtons'] = $buttons; |
|
193 | ||
194 | return $this; |
|
195 | } |
|
196 | ||
197 | /** |
|
198 | * @param mixed $message |