Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
15 / 15 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Changelog | |
100.00% |
15 / 15 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| readResponse | |
100.00% |
15 / 15 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package Zmsadmin |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
| 6 | **/ |
| 7 | |
| 8 | namespace BO\Zmsadmin; |
| 9 | |
| 10 | use BO\Zmsadmin\Helper\ChangelogHelper; |
| 11 | |
| 12 | class Changelog extends BaseController |
| 13 | { |
| 14 | /** |
| 15 | * @SuppressWarnings(Param) |
| 16 | * @return String |
| 17 | */ |
| 18 | public function readResponse( |
| 19 | \Psr\Http\Message\RequestInterface $request, |
| 20 | \Psr\Http\Message\ResponseInterface $response, |
| 21 | array $args |
| 22 | ) { |
| 23 | try { |
| 24 | $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 1])->getEntity(); |
| 25 | } catch (\Exception $workstationexception) { |
| 26 | $workstation = null; |
| 27 | } |
| 28 | |
| 29 | $changelogHelper = new ChangelogHelper(); |
| 30 | $changelogContent = $changelogHelper->getChangelogHtml(); |
| 31 | |
| 32 | return \BO\Slim\Render::withHtml( |
| 33 | $response, |
| 34 | 'page/changelog.twig', |
| 35 | array( |
| 36 | 'title' => 'Changelog', |
| 37 | 'menuActive' => 'changelog', |
| 38 | 'workstation' => $workstation, |
| 39 | 'changelogContent' => $changelogContent |
| 40 | ) |
| 41 | ); |
| 42 | } |
| 43 | } |