@@ 179-190 (lines=12) @@ | ||
176 | * @param string|callable $class |
|
177 | * @return static |
|
178 | */ |
|
179 | public function setClass($class) |
|
180 | { |
|
181 | if (!is_string($class) && !is_callable($class)) { |
|
182 | throw new DataGridException( |
|
183 | 'Action class has to be either string or callback, that will return string' |
|
184 | ); |
|
185 | } |
|
186 | ||
187 | $this->class = $class; |
|
188 | ||
189 | return $this; |
|
190 | } |
|
191 | ||
192 | ||
193 | /** |
|
@@ 222-233 (lines=12) @@ | ||
219 | * @param string|callable $icon |
|
220 | * @return static|callable |
|
221 | */ |
|
222 | public function setIcon($icon) |
|
223 | { |
|
224 | if (!is_string($icon) && !is_callable($icon)) { |
|
225 | throw new DataGridException( |
|
226 | 'Action icon has to be either string or callback, that will return string' |
|
227 | ); |
|
228 | } |
|
229 | ||
230 | $this->icon = $icon; |
|
231 | ||
232 | return $this; |
|
233 | } |
|
234 | ||
235 | ||
236 | /** |