Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
SourceIndex
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 readResponse
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3/**
4 *
5 * @package Zmsadmin
6 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
7 *
8 */
9
10namespace BO\Zmsadmin;
11
12class SourceIndex extends BaseController
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        if (!$workstation->hasSuperUseraccount()) {
25            throw new Exception\NotAllowed();
26        }
27        $sourceList = \App::$http->readGetResult('/source/', ['resolveReferences' => 0])->getCollection();
28
29        return \BO\Slim\Render::withHtml(
30            $response,
31            'page/sourceindex.twig',
32            array(
33                'title' => 'Mandanten',
34                'menuActive' => 'source',
35                'workstation' => $workstation,
36                'sourceList' => $sourceList
37            )
38        );
39    }
40}