@@ 72-83 (lines=12) @@ | ||
69 | * @param array $buttons |
|
70 | * @return $this |
|
71 | */ |
|
72 | public function buttons(array $buttons) |
|
73 | { |
|
74 | foreach ($buttons as $key => $button) { |
|
75 | if ($button instanceof Arrayable) { |
|
76 | $buttons[$key] = $button->toArray(); |
|
77 | } |
|
78 | } |
|
79 | ||
80 | $this->attributes['buttons'] = $buttons; |
|
81 | ||
82 | return $this; |
|
83 | } |
|
84 | ||
85 | /** |
|
86 | * @param array $buttons |
|
@@ 90-101 (lines=12) @@ | ||
87 | * @return $this |
|
88 | * @see https://editor.datatables.net/examples/api/cancelButton |
|
89 | */ |
|
90 | public function formButtons(array $buttons) |
|
91 | { |
|
92 | foreach ($buttons as $key => $button) { |
|
93 | if ($button instanceof Arrayable) { |
|
94 | $buttons[$key] = $button->toArray(); |
|
95 | } |
|
96 | } |
|
97 | ||
98 | $this->attributes['formButtons'] = $buttons; |
|
99 | ||
100 | return $this; |
|
101 | } |
|
102 | ||
103 | /** |
|
104 | * Set className option value. |