Lines
0.00%
0 / 10
Functions and Methods
0.00%
0 / 1
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| MailTemplateHandler | 0.00% | 0 / 10 | 0.00% | 0 / 1 | 2 | 0.00% | 0 / 1 | |||
| readResponse | 0.00% | 0 / 10 | 0.00% | 0 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | /** | |
| 4 | * @package Zmsadmin | |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG | |
| 6 | **/ | |
| 7 | ||
| 8 | namespace BO\Zmsadmin\Helper; | |
| 9 | ||
| 10 | use BO\Zmsadmin\BaseController; | |
| 11 | ||
| 12 | class MailTemplateHandler extends BaseController | |
| 13 | { | |
| 14 | /** | |
| 15 | * @SuppressWarnings(Param) | |
| 16 | * @return \Psr\Http\Message\ResponseInterface | |
| 17 | */ | |
| 18 | #[\Override] | |
| 19 | public function readResponse( | |
| 20 | \Psr\Http\Message\RequestInterface $request, | |
| 21 | \Psr\Http\Message\ResponseInterface $response, | |
| 22 | array $args | |
| 23 | ) { | |
| 24 | ||
| 25 | $validator = $request->getAttribute('validator'); | |
| 26 | $input = $validator->getInput()->isJson()->getValue(); | |
| 27 | ||
| 28 | $template = \App::$http->readPostResult('/mailtemplates/', array( | |
| 29 | "templateId" => $input['templateId'], | |
| 30 | "templateContent" => $input['templateContent'] | |
| 31 | ))->getEntity(); | |
| 32 | ||
| 33 | ||
| 34 | return \BO\Slim\Render::withJson( | |
| 35 | $response, | |
| 36 | $template | |
| 37 | ); | |
| 38 | } | |
| 39 | } |