Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| OwnerDelete | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| readResponse | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package Zmsadmin |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
| 6 | **/ |
| 7 | |
| 8 | namespace BO\Zmsadmin; |
| 9 | |
| 10 | use BO\Mellon\Validator; |
| 11 | use BO\Slim\Render; |
| 12 | |
| 13 | /** |
| 14 | * Delete an Owner |
| 15 | * |
| 16 | */ |
| 17 | class OwnerDelete extends BaseController |
| 18 | { |
| 19 | /** |
| 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 | $entityId = Validator::value($args['id'])->isNumber()->getValue(); |
| 28 | \App::$http->readDeleteResult('/owner/' . $entityId . '/')->getEntity(); |
| 29 | return \BO\Slim\Render::redirect( |
| 30 | 'owner_overview', |
| 31 | array(), |
| 32 | array( |
| 33 | 'success' => 'owner_deleted' |
| 34 | ) |
| 35 | ); |
| 36 | } |
| 37 | } |