Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| FaqController | |
0.00% |
0 / 8 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| list | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| detail | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Olz\Controller; |
| 4 | |
| 5 | use Olz\Faq\Components\OlzFaqDetail\OlzFaqDetail; |
| 6 | use Olz\Faq\Components\OlzFaqList\OlzFaqList; |
| 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 FaqController extends AbstractController { |
| 15 | #[Route('/fragen_und_antworten')] |
| 16 | public function list( |
| 17 | Request $request, |
| 18 | LoggerInterface $logger, |
| 19 | HttpUtils $httpUtils, |
| 20 | OlzFaqList $olzFaqList, |
| 21 | ): Response { |
| 22 | $httpUtils->countRequest($request, ['von']); |
| 23 | $httpUtils->stripParams($request, ['von']); |
| 24 | $out = $olzFaqList->getHtml([]); |
| 25 | return new Response($out); |
| 26 | } |
| 27 | |
| 28 | #[Route('/fragen_und_antworten/{ident}')] |
| 29 | public function detail( |
| 30 | Request $request, |
| 31 | LoggerInterface $logger, |
| 32 | HttpUtils $httpUtils, |
| 33 | OlzFaqDetail $olzFaqDetail, |
| 34 | string $ident, |
| 35 | ): Response { |
| 36 | $httpUtils->countRequest($request, ['von']); |
| 37 | $httpUtils->stripParams($request, ['von']); |
| 38 | $out = $olzFaqDetail->getHtml(['ident' => $ident]); |
| 39 | return new Response($out); |
| 40 | } |
| 41 | } |