Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
91.67% |
11 / 12 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Dayoff | |
91.67% |
11 / 12 |
|
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
| readResponse | |
91.67% |
11 / 12 |
|
0.00% |
0 / 1 |
2.00 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package Zmsadmin |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
| 6 | **/ |
| 7 | |
| 8 | namespace BO\Zmsadmin; |
| 9 | |
| 10 | class Dayoff extends BaseController |
| 11 | { |
| 12 | /** |
| 13 | * @SuppressWarnings(Param) |
| 14 | * @return \Psr\Http\Message\ResponseInterface |
| 15 | */ |
| 16 | #[\Override] |
| 17 | public function readResponse( |
| 18 | \Psr\Http\Message\RequestInterface $request, |
| 19 | \Psr\Http\Message\ResponseInterface $response, |
| 20 | array $args |
| 21 | ): \Psr\Http\Message\ResponseInterface { |
| 22 | $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 1])->getEntity(); |
| 23 | if (!$workstation->getUseraccount()->hasPermissions(['dayoff'])) { |
| 24 | throw new \BO\Zmsentities\Exception\UserAccountMissingRights(); |
| 25 | } |
| 26 | return \BO\Slim\Render::withHtml( |
| 27 | $response, |
| 28 | 'page/dayoff.twig', |
| 29 | array( |
| 30 | 'title' => 'Allgemein gültige Feiertage - Jahresauswahl', |
| 31 | 'workstation' => $workstation, |
| 32 | 'menuActive' => 'dayoff' |
| 33 | ) |
| 34 | ); |
| 35 | } |
| 36 | } |