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