Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
17 / 17 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| PickupHandheld | |
100.00% |
17 / 17 |
|
100.00% |
1 / 1 |
4 | |
100.00% |
1 / 1 |
| readResponse | |
100.00% |
17 / 17 |
|
100.00% |
1 / 1 |
4 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package Zmsadmin |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
| 6 | **/ |
| 7 | |
| 8 | namespace BO\Zmsadmin; |
| 9 | |
| 10 | class PickupHandheld extends PickupQueue |
| 11 | { |
| 12 | /** |
| 13 | * @SuppressWarnings(Param) |
| 14 | * @return String |
| 15 | */ |
| 16 | public function readResponse( |
| 17 | \Psr\Http\Message\RequestInterface $request, |
| 18 | \Psr\Http\Message\ResponseInterface $response, |
| 19 | array $args |
| 20 | ) { |
| 21 | $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 1])->getEntity(); |
| 22 | $selectedProcess = null; |
| 23 | if ($request->getMethod() === 'POST') { |
| 24 | $input = $request->getParsedBody(); |
| 25 | $selectedProcess = $input['inputNumber']; |
| 26 | } |
| 27 | if ($workstation->process && $workstation->process->hasId()) { |
| 28 | $selectedProcess = $workstation->process['id']; |
| 29 | } |
| 30 | |
| 31 | return \BO\Slim\Render::withHtml( |
| 32 | $response, |
| 33 | 'page/pickupHandheld.twig', |
| 34 | array( |
| 35 | 'title' => 'Abholer verwalten', |
| 36 | 'workstation' => $workstation->getArrayCopy(), |
| 37 | 'menuActive' => 'pickup', |
| 38 | 'selectedProcess' => $selectedProcess |
| 39 | ) |
| 40 | ); |
| 41 | } |
| 42 | } |