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