Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
19 / 19
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Pickup
100.00% covered (success)
100.00%
19 / 19
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 readResponse
100.00% covered (success)
100.00%
19 / 19
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3/**
4 * @package Zmsadmin
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsadmin;
9
10class Pickup extends BaseController
11{
12    public static $defaultLimit = 500;
13
14    /**
15     * @SuppressWarnings(Param)
16     * @return String
17     */
18    public function readResponse(
19        \Psr\Http\Message\RequestInterface $request,
20        \Psr\Http\Message\ResponseInterface $response,
21        array $args
22    ) {
23        $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 1])->getEntity();
24        $validator = $request->getAttribute('validator');
25        $selectedProcess = $validator->getParameter('selectedprocess')->isString()->getValue();
26        $limit = $validator->getParameter('limit')->isNumber()->setDefault(static::$defaultLimit)->getValue();
27        $offset = $validator->getParameter('offset')->isNumber()->setDefault(0)->getValue();
28
29        return \BO\Slim\Render::withHtml(
30            $response,
31            'page/pickup.twig',
32            array(
33              'title' => 'Abholer verwalten',
34              'workstation' => $workstation,
35              'menuActive' => 'pickup',
36              'source' => 'pickup',
37              'limit' => $limit,
38              'offset' => $offset,
39              'selectedScope' => $workstation->scope['id'],
40              'selectedProcess' => ($workstation->process->hasId()) ? $workstation->process->getId() : $selectedProcess
41            )
42        );
43    }
44}