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

DeleteRelationEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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