Completed
Push — ezp-30616 ( e3f22a )
by
unknown
17:55
created

PublishVersionEvent::getTranslations()   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\Core\Event\Content;
10
11
use eZ\Publish\API\Repository\Values\Content\Content;
12
use eZ\Publish\API\Repository\Values\Content\VersionInfo;
13
use eZ\Publish\Core\Event\AfterEvent;
14
15
final class PublishVersionEvent extends AfterEvent
16
{
17
    /** @var \eZ\Publish\API\Repository\Values\Content\Content */
18
    private $content;
19
20
    /** @var \eZ\Publish\API\Repository\Values\Content\VersionInfo */
21
    private $versionInfo;
22
23
    /**
24
     * @var string[]
25
     */
26
    private $translations;
27
28
    public function __construct(
29
        Content $content,
30
        VersionInfo $versionInfo,
31
        array $translations
32
    ) {
33
        $this->content = $content;
34
        $this->versionInfo = $versionInfo;
35
        $this->translations = $translations;
36
    }
37
38
    public function getContent(): Content
39
    {
40
        return $this->content;
41
    }
42
43
    public function getVersionInfo(): VersionInfo
44
    {
45
        return $this->versionInfo;
46
    }
47
48
    public function getTranslations(): array
49
    {
50
        return $this->translations;
51
    }
52
}
53