| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) |
||
| 24 | { |
||
| 25 | $markdownCmsConfig = $this->getMarkdownCmsConfig(); |
||
| 26 | $tagId = $request->getAttribute('id'); |
||
| 27 | |||
| 28 | $entries = []; |
||
| 29 | $entryParser = $this->getEntryParser(); |
||
| 30 | foreach ($markdownCmsConfig['content']['content_types']['blogEntry']['tags'][$tagId] as $id) { |
||
| 31 | $entries[] = $entryParser($id); |
||
| 32 | } |
||
| 33 | |||
| 34 | $data = [ |
||
| 35 | 'entries' => $entries, |
||
| 36 | 'tag' => new Tag($tagId) |
||
| 37 | ]; |
||
| 38 | return new HtmlResponse($this->getTemplateRenderer()->render('app::tag-archive.twig', $data)); |
||
| 39 | } |
||
| 40 | } |