1 | <?php |
||
22 | class Tenant extends BaseTenant implements TenantInterface, ArticlesCountInterface, OutputChannelAwareInterface |
||
23 | { |
||
24 | use ArticlesCountTrait; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $themeName; |
||
30 | |||
31 | /** |
||
32 | * @var RouteInterface |
||
33 | */ |
||
34 | protected $homepage; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | protected $ampEnabled = false; |
||
40 | |||
41 | /** |
||
42 | * @var BaseOutputChannelInterface|null |
||
43 | */ |
||
44 | protected $outputChannel; |
||
45 | 44 | ||
46 | /** @var AppleNewsConfig|null */ |
||
47 | 44 | protected $appleNewsConfig; |
|
48 | |||
49 | protected ?PWAConfig $pwaConfig = null; |
||
|
|||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | 104 | */ |
|
54 | public function getThemeName() |
||
55 | 104 | { |
|
56 | 104 | return $this->themeName; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | 2 | */ |
|
62 | public function setThemeName($themeName) |
||
63 | 2 | { |
|
64 | $this->themeName = $themeName; |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | 104 | */ |
|
70 | public function getHomepage() |
||
71 | 104 | { |
|
72 | 104 | return $this->homepage; |
|
73 | } |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | 7 | */ |
|
78 | public function setHomepage(RouteInterface $homepage) |
||
79 | 7 | { |
|
80 | $this->homepage = $homepage; |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | 1 | */ |
|
86 | public function isAmpEnabled(): bool |
||
87 | 1 | { |
|
88 | 1 | return $this->ampEnabled; |
|
89 | } |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | 8 | */ |
|
94 | public function setAmpEnabled(bool $ampEnabled) |
||
95 | 8 | { |
|
96 | $this->ampEnabled = $ampEnabled; |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | 104 | */ |
|
102 | public function getOutputChannel(): ?BaseOutputChannelInterface |
||
103 | 104 | { |
|
104 | 104 | return $this->outputChannel; |
|
105 | } |
||
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | public function setOutputChannel(?BaseOutputChannelInterface $outputChannel): void |
||
111 | { |
||
112 | $this->outputChannel = $outputChannel; |
||
113 | |||
114 | if ($outputChannel instanceof OutputChannelInterface) { |
||
115 | $outputChannel->setTenant($this); |
||
116 | } |
||
117 | } |
||
118 | |||
119 | public function getAppleNewsConfig(): ?AppleNewsConfig |
||
120 | { |
||
121 | return $this->appleNewsConfig; |
||
122 | } |
||
123 | |||
124 | public function setAppleNewsConfig(?AppleNewsConfig $appleNewsConfig): void |
||
125 | { |
||
126 | if ($appleNewsConfig instanceof AppleNewsConfig) { |
||
127 | $appleNewsConfig->setTenant($this); |
||
128 | } |
||
129 | |||
130 | $this->appleNewsConfig = $appleNewsConfig; |
||
131 | } |
||
149 |