Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
35 / 35
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
ExchangeUseraccount
100.00% covered (success)
100.00%
35 / 35
100.00% covered (success)
100.00%
3 / 3
4
100.00% covered (success)
100.00%
1 / 1
 readEntity
100.00% covered (success)
100.00%
21 / 21
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('rightsnotification', 'string', 'Nutzung SMS-Versands');
18        $entity->addDictionaryEntry('rightsticketprinter', 'string', 'Ein- und Ausschlaten vom Kiosk');
19        $entity->addDictionaryEntry('rightsavailability', 'string', 'Administration von Öffnungszeiten');
20        $entity->addDictionaryEntry('rightsscope', 'string', 'Administration von Standorten');
21        $entity->addDictionaryEntry('rightsuseraccount', 'string', 'Administration von Nutzer');
22        $entity->addDictionaryEntry('rightscluster', 'string', 'Administration von Standortclustern');
23        $entity->addDictionaryEntry('rightsdepartment', 'string', 'Adminstration von Behoerden');
24        $entity->addDictionaryEntry('rightssorganisation', 'string', 'Adminstration von Bezirken');
25        $entity->addDictionaryEntry('rightssuperuser', 'string', 'Superuser', 'useraccount.rights.superuser');
26
27        $raw = $this
28            ->getReader()
29            ->fetchAll(constant("\BO\Zmsdb\Query\ExchangeUseraccount::QUERY_READ_REPORT"), []);
30        foreach ($raw as $entry) {
31            $entity->addDataSet(array_values($entry));
32        }
33        return $entity;
34    }
35
36    public function readSubjectList()
37    {
38        $entity = new Exchange();
39        $entity['title'] = "Nutzerliste";
40        $entity->setPeriod(new \DateTimeImmutable(), new \DateTimeImmutable());
41        $entity->addDictionaryEntry('subject', 'string', 'ID');
42        $entity->addDictionaryEntry('periodstart', 'string', 'Datum von');
43        $entity->addDictionaryEntry('periodend', 'string', 'Datum bis');
44        $entity->addDictionaryEntry('description', 'string', 'Beschreibung');
45        $entity->addDataSet(["_", "", "", "Alle Nutzer"]);
46        return $entity;
47    }
48
49    /**
50     * @SuppressWarnings(Param)
51     */
52    public function readPeriodList()
53    {
54        $entity = new Exchange();
55        $entity['title'] = "Nutzerliste";
56        $entity->addDictionaryEntry('id', 'string', 'Organisation', 'useraccount.rights.superuser');
57        $entity->addDataSet(["_"]);
58        return $entity;
59    }
60}