Completed
Pull Request — 2.1 (#1090)
by Paweł
09:07
created

PublishDestination::isPublishedToAppleNews()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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;
27
    use OrganizationAwareTrait;
28
    use PaywallSecuredTrait;
29
30
    /**
31
     * @var string
32
     */
33
    protected $id;
34
35
    /**
36
     * @var TenantInterface
37
     */
38
    protected $tenant;
39
40
    /**
41
     * @var RouteInterface
42
     */
43
    protected $route;
44
45
    /**
46
     * @var bool
47
     */
48
    protected $isPublishedFbia = true;
49
50
    /**
51
     * @var bool
52
     */
53
    protected $published = true;
54
55
    /**
56
     * @var string
57
     */
58
    protected $packageGuid;
59
60
    /**
61
     * @var array
62
     */
63
    protected $contentLists = [];
64
65
    /**
66
     * @var bool
67
     */
68
    protected $isPublishedToAppleNews = false;
69
70
    /**
71
     * {@inheritdoc}
72
     */
73
    public function getId()
74
    {
75
        return $this->id;
76
    }
77
78
    /**
79
     * {@inheritdoc}
80
     */
81
    public function getTenant()
82
    {
83
        return $this->tenant;
84
    }
85
86
    /**
87
     * {@inheritdoc}
88
     */
89
    public function setTenant(TenantInterface $tenant)
90
    {
91
        $this->tenant = $tenant;
92
    }
93
94
    /**
95
     * {@inheritdoc}
96
     */
97
    public function getRoute()
98
    {
99
        return $this->route;
100
    }
101
102
    /**
103
     * {@inheritdoc}
104
     */
105
    public function setRoute(RouteInterface $route)
106
    {
107
        $this->route = $route;
108
    }
109
110
    /**
111
     * {@inheritdoc}
112
     */
113
    public function isPublishedFbia(): bool
114
    {
115
        return $this->isPublishedFbia;
116
    }
117
118
    /**
119
     * {@inheritdoc}
120
     */
121
    public function setIsPublishedFbia(bool $isPublishedFbia): void
122
    {
123
        $this->isPublishedFbia = $isPublishedFbia;
124
    }
125
126
    /**
127
     * {@inheritdoc}
128
     */
129
    public function isPublished(): bool
130
    {
131
        return $this->published;
132
    }
133
134
    /**
135
     * {@inheritdoc}
136
     */
137
    public function setPublished(bool $published): void
138
    {
139
        $this->published = $published;
140
    }
141
142
    /**
143
     * {@inheritdoc}
144
     */
145
    public function getPackageGuid(): ?string
146
    {
147
        return $this->packageGuid;
148
    }
149
150
    /**
151
     * {@inheritdoc}
152
     */
153
    public function setPackageGuid(?string $packageGuid): void
154
    {
155
        $this->packageGuid = $packageGuid;
156
    }
157
158
    public function getContentLists(): array
159
    {
160
        if (null === $this->contentLists) {
161
            return [];
162
        }
163
164
        return $this->contentLists;
165
    }
166
167
    public function setContentLists(array $contentLists): void
168
    {
169
        $this->contentLists = $contentLists;
170
    }
171
172
    public function isPublishedToAppleNews(): bool
173
    {
174
        return $this->isPublishedToAppleNews;
175
    }
176
177
    public function setIsPublishedToAppleNews(bool $isPublishedToAppleNews): void
178
    {
179
        $this->isPublishedToAppleNews = $isPublishedToAppleNews;
180
    }
181
}
182