Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
34 / 34
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
ExchangeUseraccount
100.00% covered (success)
100.00%
34 / 34
100.00% covered (success)
100.00%
3 / 3
4
100.00% covered (success)
100.00%
1 / 1
 readEntity
100.00% covered (success)
100.00%
20 / 20
100.00% covered (success)
100.00%
1 / 1
2
 readSubjectList
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
1 / 1
1
 readPeriodList
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace BO\Zmsdb;
4
5use BO\Zmsentities\Exchange;
6
7class ExchangeUseraccount extends Base
8{
9    public function readEntity()
10    {
11        $entity = new Exchange();
12        $entity['title'] = "Nutzerliste";
13        $entity->addDictionaryEntry('Organisation', 'string', 'Name der Organisation');
14        $entity->addDictionaryEntry('Behoerde', 'string', 'Name der Berhoerde');
15        $entity->addDictionaryEntry('Name', 'string', 'Name des Nutzers');
16        $entity->addDictionaryEntry('lastUpdate', 'string', 'Letzte Aktivität des Nutzers oder Änderung durch Admin');
17        $entity->addDictionaryEntry('rightsticketprinter', 'string', 'Ein- und Ausschlaten vom Kiosk');
18        $entity->addDictionaryEntry('rightsavailability', 'string', 'Administration von Öffnungszeiten');
19        $entity->addDictionaryEntry('rightsscope', 'string', 'Administration von Standorten');
20        $entity->addDictionaryEntry('rightsuseraccount', 'string', 'Administration von Nutzer');
21        $entity->addDictionaryEntry('rightscluster', 'string', 'Administration von Standortclustern');
22        $entity->addDictionaryEntry('rightsdepartment', 'string', 'Adminstration von Behoerden');
23        $entity->addDictionaryEntry('rightssorganisation', 'string', 'Adminstration von Bezirken');
24        $entity->addDictionaryEntry('rightssuperuser', 'string', 'Superuser', 'useraccount.rights.superuser');
25
26        $raw = $this
27            ->getReader()
28            ->fetchAll(constant("\BO\Zmsdb\Query\ExchangeUseraccount::QUERY_READ_REPORT"), []);
29        foreach ($raw as $entry) {
30            $entity->addDataSet(array_values($entry));
31        }
32        return $entity;
33    }
34
35    public function readSubjectList()
36    {
37        $entity = new Exchange();
38        $entity['title'] = "Nutzerliste";
39        $entity->setPeriod(new \DateTimeImmutable(), new \DateTimeImmutable());
40        $entity->addDictionaryEntry('subject', 'string', 'ID');
41        $entity->addDictionaryEntry('periodstart', 'string', 'Datum von');
42        $entity->addDictionaryEntry('periodend', 'string', 'Datum bis');
43        $entity->addDictionaryEntry('description', 'string', 'Beschreibung');
44        $entity->addDataSet(["_", "", "", "Alle Nutzer"]);
45        return $entity;
46    }
47
48    /**
49     * @SuppressWarnings(Param)
50     */
51    public function readPeriodList()
52    {
53        $entity = new Exchange();
54        $entity['title'] = "Nutzerliste";
55        $entity->addDictionaryEntry('id', 'string', 'Organisation', 'useraccount.rights.superuser');
56        $entity->addDataSet(["_"]);
57        return $entity;
58    }
59}