Completed
Pull Request — develop (#305)
by Wachter
15:11
created

ArticleTranslation::getRoute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Sulu\Bundle\ArticleBundle\Prooph\Model;
4
5
use Sulu\Bundle\RouteBundle\Model\RoutableInterface;
6
use Sulu\Bundle\RouteBundle\Model\RouteInterface;
7
use Sulu\Component\Content\Document\WorkflowStage;
8
9
class ArticleTranslation implements RoutableInterface
10
{
11
    /**
12
     * @var string
13
     */
14
    public $id;
15
16
    /**
17
     * @var string
18
     */
19
    public $locale;
20
21
    /**
22
     * @var string
23
     */
24
    public $title;
25
26
    /**
27
     * @var string
28
     */
29
    public $routePath;
30
31
    /**
32
     * @var string
33
     */
34
    public $structureType;
35
36
    /**
37
     * @var array
38
     */
39
    public $structureData = [];
40
41
    /**
42
     * @var int
43
     */
44
    public $createdBy;
45
46
    /**
47
     * @var int
48
     */
49
    public $modifiedBy;
50
51
    /**
52
     * @var \DateTimeImmutable
53
     */
54
    public $createdAt;
55
56
    /**
57
     * @var \DateTimeImmutable
58
     */
59
    public $modifiedAt;
60
61
    /**
62
     * @var int
63
     */
64
    public $publishedBy;
65
66
    /**
67
     * @var \DateTimeImmutable
68
     */
69
    public $publishedAt;
70
71
    /**
72
     * @var int
73
     */
74
    public $workflowStage = WorkflowStage::TEST;
75
76
    // TODO pageTitle, versions, extensions, pages, author
77
78
    /**
79
     * @var  RouteInterface
80
     */
81
    private $route;
82
83
    public function getId()
84
    {
85
        return $this->id;
86
    }
87
88
    public function getRoute()
89
    {
90
        return $this->route;
91
    }
92
93
    public function setRoute(RouteInterface $route)
94
    {
95
        $this->route = $route;
96
        $this->routePath = $route->getPath();
97
    }
98
99
    public function getLocale()
100
    {
101
        return $this->locale;
102
    }
103
}
104