1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the Superdesk Web Publisher Core Bundle. |
7
|
|
|
* |
8
|
|
|
* Copyright 2017 Sourcefabric z.ú. and contributors. |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, please see the |
11
|
|
|
* AUTHORS and LICENSE files distributed with this source code. |
12
|
|
|
* |
13
|
|
|
* @copyright 2017 Sourcefabric z.ú |
14
|
|
|
* @license http://www.superdesk.org/license |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
namespace SWP\Bundle\CoreBundle\Model; |
18
|
|
|
|
19
|
|
|
use SWP\Bundle\ContentBundle\Model\RouteInterface; |
20
|
|
|
use SWP\Component\Common\Model\TimestampableTrait; |
21
|
|
|
use SWP\Component\MultiTenancy\Model\OrganizationAwareTrait; |
22
|
|
|
use SWP\Component\Paywall\Model\PaywallSecuredTrait; |
23
|
|
|
|
24
|
|
|
class PublishDestination implements PublishDestinationInterface |
25
|
|
|
{ |
26
|
|
|
use TimestampableTrait, OrganizationAwareTrait, PaywallSecuredTrait; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
protected $id; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var TenantInterface |
35
|
|
|
*/ |
36
|
|
|
protected $tenant; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var RouteInterface |
40
|
|
|
*/ |
41
|
|
|
protected $route; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var bool |
45
|
|
|
*/ |
46
|
|
|
protected $isPublishedFbia = true; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var bool |
50
|
|
|
*/ |
51
|
|
|
protected $published = true; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var string |
55
|
|
|
*/ |
56
|
|
|
protected $packageGuid; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* {@inheritdoc} |
60
|
|
|
*/ |
61
|
|
|
public function getId() |
62
|
|
|
{ |
63
|
|
|
return $this->id; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* {@inheritdoc} |
68
|
|
|
*/ |
69
|
|
|
public function getTenant() |
70
|
|
|
{ |
71
|
|
|
return $this->tenant; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* {@inheritdoc} |
76
|
|
|
*/ |
77
|
|
|
public function setTenant(TenantInterface $tenant) |
78
|
|
|
{ |
79
|
|
|
$this->tenant = $tenant; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* {@inheritdoc} |
84
|
|
|
*/ |
85
|
|
|
public function getRoute() |
86
|
|
|
{ |
87
|
|
|
return $this->route; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* {@inheritdoc} |
92
|
|
|
*/ |
93
|
|
|
public function setRoute(RouteInterface $route) |
94
|
|
|
{ |
95
|
|
|
$this->route = $route; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* {@inheritdoc} |
100
|
|
|
*/ |
101
|
|
|
public function isPublishedFbia(): bool |
102
|
|
|
{ |
103
|
|
|
return $this->isPublishedFbia; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* {@inheritdoc} |
108
|
|
|
*/ |
109
|
|
|
public function setIsPublishedFbia(bool $isPublishedFbia): void |
110
|
|
|
{ |
111
|
|
|
$this->isPublishedFbia = $isPublishedFbia; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* {@inheritdoc} |
116
|
|
|
*/ |
117
|
|
|
public function isPublished(): bool |
118
|
|
|
{ |
119
|
|
|
return $this->published; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* {@inheritdoc} |
124
|
|
|
*/ |
125
|
|
|
public function setPublished(bool $published): void |
126
|
|
|
{ |
127
|
|
|
$this->published = $published; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* {@inheritdoc} |
132
|
|
|
*/ |
133
|
|
|
public function getPackageGuid(): ?string |
134
|
|
|
{ |
135
|
|
|
return $this->packageGuid; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* {@inheritdoc} |
140
|
|
|
*/ |
141
|
|
|
public function setPackageGuid(?string $packageGuid): void |
142
|
|
|
{ |
143
|
|
|
$this->packageGuid = $packageGuid; |
144
|
|
|
} |
145
|
|
|
} |
146
|
|
|
|