Completed
Push — signal-slots ( f9cce0...3c05c8 )
by
unknown
14:14
created

AddPolicyEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Event\Role;
10
11
use eZ\Publish\API\Repository\Values\User\PolicyCreateStruct;
12
use eZ\Publish\API\Repository\Values\User\Role;
13
use eZ\Publish\Core\Event\AfterEvent;
14
15
final class AddPolicyEvent extends AfterEvent
16
{
17
    public const NAME = 'ezplatform.event.role.add_policy';
18
19
    /**
20
     * @var \eZ\Publish\API\Repository\Values\User\Role
21
     */
22
    private $role;
23
24
    /**
25
     * @var \eZ\Publish\API\Repository\Values\User\PolicyCreateStruct
26
     */
27
    private $policyCreateStruct;
28
29
    /**
30
     * @var \eZ\Publish\API\Repository\Values\User\Role
31
     */
32
    private $updatedRole;
33
34
    public function __construct(
35
        Role $updatedRole,
36
        Role $role,
37
        PolicyCreateStruct $policyCreateStruct
38
    ) {
39
        $this->role = $role;
40
        $this->policyCreateStruct = $policyCreateStruct;
41
        $this->updatedRole = $updatedRole;
42
    }
43
44
    public function getRole(): Role
45
    {
46
        return $this->role;
47
    }
48
49
    public function getPolicyCreateStruct(): PolicyCreateStruct
50
    {
51
        return $this->policyCreateStruct;
52
    }
53
54
    public function getUpdatedRole(): Role
55
    {
56
        return $this->updatedRole;
57
    }
58
}
59