Lines
100.00%
14 / 14
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| WorkstationProcessCancelNext | 100.00% | 14 / 14 | 100.00% | 1 / 1 | 2 | 100.00% | 1 / 1 | |||
| readResponse | 100.00% | 14 / 14 | 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\ExcludeIds; | |
| 11 | ||
| 12 | /** | |
| 13 | * Init Controller to display next Button Template only | |
| 14 | * | |
| 15 | */ | |
| 16 | class WorkstationProcessCancelNext extends BaseController | |
| 17 | { | |
| 18 | /** | |
| 19 | * @SuppressWarnings(Param) | |
| 20 | * @return \Psr\Http\Message\ResponseInterface | |
| 21 | */ | |
| 22 | #[\Override] | |
| 23 | public function readResponse( | |
| 24 | \Psr\Http\Message\RequestInterface $request, | |
| 25 | \Psr\Http\Message\ResponseInterface $response, | |
| 26 | array $args | |
| 27 | ): \Psr\Http\Message\ResponseInterface { | |
| 28 | $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 2])->getEntity(); | |
| 29 | $validator = $request->getAttribute('validator'); | |
| 30 | $excludedIds = ExcludeIds::fromQuery( | |
| 31 | $validator->getParameter('exclude')->isString()->getValue() | |
| 32 | ); | |
| 33 | if ($workstation->process['id']) { | |
| 34 | \App::$http->readDeleteResult('/workstation/process/', ['action' => 'requeue_and_skip_to_next'])->getEntity(); | |
| 35 | } | |
| 36 | return \BO\Slim\Render::redirect( | |
| 37 | 'workstationProcessNext', | |
| 38 | array(), | |
| 39 | array( | |
| 40 | 'exclude' => ExcludeIds::toQuery($excludedIds) | |
| 41 | ) | |
| 42 | ); | |
| 43 | } | |
| 44 | } |