| @@ 56-69 (lines=14) @@ | ||
| 53 | * |
|
| 54 | * @return string |
|
| 55 | */ |
|
| 56 | public function render() |
|
| 57 | { |
|
| 58 | return $this->tools->map(function ($tool) { |
|
| 59 | if ($tool instanceof Renderable) { |
|
| 60 | return $tool->render(); |
|
| 61 | } |
|
| 62 | ||
| 63 | if ($tool instanceof Htmlable) { |
|
| 64 | return $tool->toHtml(); |
|
| 65 | } |
|
| 66 | ||
| 67 | return (string) $tool; |
|
| 68 | })->implode(' '); |
|
| 69 | } |
|
| 70 | } |
|
| 71 | ||
| @@ 73-83 (lines=11) @@ | ||
| 70 | return ''; |
|
| 71 | } |
|
| 72 | ||
| 73 | return $this->elements[$part]->map(function ($element) { |
|
| 74 | if ($element instanceof Htmlable) { |
|
| 75 | return $element->toHtml(); |
|
| 76 | } |
|
| 77 | ||
| 78 | if ($element instanceof Renderable) { |
|
| 79 | return $element->render(); |
|
| 80 | } |
|
| 81 | ||
| 82 | return (string) $element; |
|
| 83 | })->implode(''); |
|
| 84 | } |
|
| 85 | } |
|
| 86 | ||
| @@ 153-163 (lines=11) @@ | ||
| 150 | $this->add($this->backButton()); |
|
| 151 | } |
|
| 152 | ||
| 153 | return $this->tools->map(function ($tool) { |
|
| 154 | if ($tool instanceof Renderable) { |
|
| 155 | return $tool->render(); |
|
| 156 | } |
|
| 157 | ||
| 158 | if ($tool instanceof Htmlable) { |
|
| 159 | return $tool->toHtml(); |
|
| 160 | } |
|
| 161 | ||
| 162 | return (string) $tool; |
|
| 163 | })->implode(' '); |
|
| 164 | } |
|
| 165 | } |
|
| 166 | ||