| @@ 285-302 (lines=18) @@ | ||
| 282 | * @param Collection $tools |
|
| 283 | * @return mixed |
|
| 284 | */ |
|
| 285 | protected function renderCustomTools($tools) |
|
| 286 | { |
|
| 287 | if (empty($tools)) { |
|
| 288 | return ''; |
|
| 289 | } |
|
| 290 | ||
| 291 | return $tools->map(function ($tool) { |
|
| 292 | if ($tool instanceof Renderable) { |
|
| 293 | return $tool->render(); |
|
| 294 | } |
|
| 295 | ||
| 296 | if ($tool instanceof Htmlable) { |
|
| 297 | return $tool->toHtml(); |
|
| 298 | } |
|
| 299 | ||
| 300 | return (string) $tool; |
|
| 301 | })->implode(' '); |
|
| 302 | } |
|
| 303 | ||
| 304 | /** |
|
| 305 | * Render tools. |
|
| @@ 276-289 (lines=14) @@ | ||
| 273 | * @param Collection $tools |
|
| 274 | * @return mixed |
|
| 275 | */ |
|
| 276 | protected function renderCustomTools($tools) |
|
| 277 | { |
|
| 278 | return $tools->map(function ($tool) { |
|
| 279 | if ($tool instanceof Renderable) { |
|
| 280 | return $tool->render(); |
|
| 281 | } |
|
| 282 | ||
| 283 | if ($tool instanceof Htmlable) { |
|
| 284 | return $tool->toHtml(); |
|
| 285 | } |
|
| 286 | ||
| 287 | return (string) $tool; |
|
| 288 | })->implode(' '); |
|
| 289 | } |
|
| 290 | ||
| 291 | /** |
|
| 292 | * Render tools. |
|