Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| OlzOtherError | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getHtml | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Olz\Components\Error\OlzOtherError; |
| 4 | |
| 5 | use Olz\Components\Common\OlzComponent; |
| 6 | use Olz\Components\Page\OlzFooter\OlzFooter; |
| 7 | use Olz\Components\Page\OlzHeaderWithoutRouting\OlzHeaderWithoutRouting; |
| 8 | |
| 9 | /** @extends OlzComponent<array<string, mixed>> */ |
| 10 | class OlzOtherError extends OlzComponent { |
| 11 | public function getHtml(mixed $args): string { |
| 12 | $http_status_code = $args['http_status_code'] ?? 500; |
| 13 | $code_href = $this->envUtils()->getCodeHref(); |
| 14 | |
| 15 | $out = ''; |
| 16 | $out .= OlzHeaderWithoutRouting::render([ |
| 17 | 'title' => "Fehler {$http_status_code}", |
| 18 | 'skip_auth_menu' => true, |
| 19 | ], $this); |
| 20 | $out .= "<div class='content-full'>"; |
| 21 | $out .= <<<ZZZZZZZZZZ |
| 22 | <div class='error-image-container-xxx'> |
| 23 | <img |
| 24 | srcset=' |
| 25 | {$code_href}assets/icns/error_system@2x.jpg 2x, |
| 26 | {$code_href}assets/icns/error_system.jpg 1x |
| 27 | ' |
| 28 | src='{$code_href}assets/icns/error_system.jpg' |
| 29 | alt='Fehlerhafter Posten' |
| 30 | class='error-image-xxx' |
| 31 | /> |
| 32 | </div> |
| 33 | <h1>Fehler {$http_status_code}: Es ist ein unbekannter Fehler aufgetreten.</h1> |
| 34 | <p><b>Hier ist dem Bahnleger ein peinlicher Fehler unterlaufen!</b></p> |
| 35 | <p>Alle Karten müssen nachgedruckt werden!</p> |
| 36 | <p>Bitte lass den Bahnleger unverzüglich wissen, dass hier ein Problem vorliegt: |
| 37 | <script type='text/javascript'> |
| 38 | olz.MailTo("website", "olzimmerberg.ch", "Bahnleger", "Fehler%20{$http_status_code}%20OLZ"); |
| 39 | </script></p> |
| 40 | <p>In der Zwischenzeit kannst du dir <a href='{$code_href}' class='linkint'>am Start ein wenig die Beine vertreten</a>, oder es später nochmals versuchen.</p> |
| 41 | ZZZZZZZZZZ; |
| 42 | $out .= "</div>"; |
| 43 | $out .= OlzFooter::render([], $this); |
| 44 | |
| 45 | return $out; |
| 46 | } |
| 47 | } |