Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| KartenController | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| karten | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| karteDetail | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Olz\Controller; |
| 4 | |
| 5 | use Olz\Karten\Components\OlzKarteDetail\OlzKarteDetail; |
| 6 | use Olz\Karten\Components\OlzKarten\OlzKarten; |
| 7 | use Olz\Utils\HttpUtils; |
| 8 | use Psr\Log\LoggerInterface; |
| 9 | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
| 10 | use Symfony\Component\HttpFoundation\Request; |
| 11 | use Symfony\Component\HttpFoundation\Response; |
| 12 | use Symfony\Component\Routing\Annotation\Route; |
| 13 | |
| 14 | class KartenController extends AbstractController { |
| 15 | #[Route('/karten')] |
| 16 | public function karten( |
| 17 | Request $request, |
| 18 | LoggerInterface $logger, |
| 19 | HttpUtils $httpUtils, |
| 20 | OlzKarten $olzKarten, |
| 21 | ): Response { |
| 22 | $httpUtils->countRequest($request); |
| 23 | $out = $olzKarten->getHtml([]); |
| 24 | return new Response($out); |
| 25 | } |
| 26 | |
| 27 | #[Route('/karten/{id}', requirements: ['id' => '\d+'])] |
| 28 | public function karteDetail( |
| 29 | Request $request, |
| 30 | LoggerInterface $logger, |
| 31 | HttpUtils $httpUtils, |
| 32 | OlzKarteDetail $olzKarteDetail, |
| 33 | int $id, |
| 34 | ): Response { |
| 35 | $httpUtils->countRequest($request); |
| 36 | $out = $olzKarteDetail->getHtml(['id' => $id]); |
| 37 | return new Response($out); |
| 38 | } |
| 39 | } |