Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| WorkstationProcessParked | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 1 |
| readResponse | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
12 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package Zmsadmin |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
| 6 | **/ |
| 7 | |
| 8 | namespace BO\Zmsadmin; |
| 9 | |
| 10 | use BO\Zmsentities\Process as Entity; |
| 11 | |
| 12 | /** |
| 13 | * Init Controller to display next Button Template only |
| 14 | * |
| 15 | */ |
| 16 | class WorkstationProcessParked extends BaseController |
| 17 | { |
| 18 | /** |
| 19 | * @SuppressWarnings(Param) |
| 20 | * @return String |
| 21 | */ |
| 22 | public function readResponse( |
| 23 | \Psr\Http\Message\RequestInterface $request, |
| 24 | \Psr\Http\Message\ResponseInterface $response, |
| 25 | array $args |
| 26 | ) { |
| 27 | $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 2])->getEntity(); |
| 28 | $validator = $request->getAttribute('validator'); |
| 29 | $noRedirect = $validator->getParameter('noredirect')->isNumber()->getValue(); |
| 30 | if ($workstation->process['id']) { |
| 31 | \App::$http->readDeleteResult('/workstation/process/parked/')->getEntity(); |
| 32 | } |
| 33 | if (1 == $noRedirect) { |
| 34 | return $response; |
| 35 | } |
| 36 | return \BO\Slim\Render::redirect( |
| 37 | 'workstationProcessCallButton', |
| 38 | array(), |
| 39 | array() |
| 40 | ); |
| 41 | } |
| 42 | } |