Completed
Push — ezp-30616-follow-up ( de1597...f1c1e1 )
by
unknown
14:34
created

AddRelationEvent::getRelation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
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\API\Repository\Events\Content;
10
11
use eZ\Publish\API\Repository\Values\Content\ContentInfo;
12
use eZ\Publish\API\Repository\Values\Content\Relation;
13
use eZ\Publish\API\Repository\Values\Content\VersionInfo;
14
use eZ\Publish\SPI\Repository\Event\AfterEvent;
15
16
final class AddRelationEvent extends AfterEvent
17
{
18
    /** @var \eZ\Publish\API\Repository\Values\Content\Relation */
19
    private $relation;
20
21
    /** @var \eZ\Publish\API\Repository\Values\Content\VersionInfo */
22
    private $sourceVersion;
23
24
    /** @var \eZ\Publish\API\Repository\Values\Content\ContentInfo */
25
    private $destinationContent;
26
27
    public function __construct(
28
        Relation $relation,
29
        VersionInfo $sourceVersion,
30
        ContentInfo $destinationContent
31
    ) {
32
        $this->relation = $relation;
33
        $this->sourceVersion = $sourceVersion;
34
        $this->destinationContent = $destinationContent;
35
    }
36
37
    public function getRelation(): Relation
38
    {
39
        return $this->relation;
40
    }
41
42
    public function getSourceVersion(): VersionInfo
43
    {
44
        return $this->sourceVersion;
45
    }
46
47
    public function getDestinationContent(): ContentInfo
48
    {
49
        return $this->destinationContent;
50
    }
51
}
52