Passed
Push — typo3_11 ( e1aa8b...4cf35f )
by Torben
05:35
created

UserRegistrationController::createUserRegistrationDemandObjectFromSettings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 1
dl 0
loc 13
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Controller;
13
14
use DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand;
15
16
/**
17
 * UserRegistrationController
18
 */
19
class UserRegistrationController extends AbstractController
20
{
21
    /**
22
     * Shows a list of all registration of the current frontend user
23
     */
24
    public function listAction()
25
    {
26
        $demand = UserRegistrationDemand::createFromSettings($this->settings);
27
        $demand->setUser($this->registrationService->getCurrentFeUserObject());
28
        $registrations = $this->registrationRepository->findRegistrationsByUserRegistrationDemand($demand);
29
        $this->view->assign('registrations', $registrations);
30
    }
31
}
32