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 2020 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 2020 Sourcefabric z.ú |
14
|
|
|
* @license http://www.superdesk.org/license |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
namespace SWP\Bundle\CoreBundle\AppleNews\Document; |
18
|
|
|
|
19
|
|
|
class ComponentTextStyle |
20
|
|
|
{ |
21
|
|
|
private $backgroundColor; |
22
|
|
|
|
23
|
|
|
private $fontName; |
24
|
|
|
|
25
|
|
|
private $fontColor; |
26
|
|
|
|
27
|
|
|
private $fontSize; |
28
|
|
|
|
29
|
|
|
private $lineHeight; |
30
|
|
|
|
31
|
|
|
private $linkStyle; |
32
|
|
|
|
33
|
|
|
/** @var int|null */ |
34
|
|
|
private $paragraphSpacingBefore; |
35
|
|
|
|
36
|
|
|
/** @var int|null */ |
37
|
|
|
private $paragraphSpacingAfter; |
38
|
|
|
|
39
|
|
|
/** @var string|null */ |
40
|
|
|
private $textColor; |
41
|
|
|
|
42
|
|
|
public function getBackgroundColor(): ?string |
43
|
|
|
{ |
44
|
|
|
return $this->backgroundColor; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
public function getFontName(): ?string |
48
|
|
|
{ |
49
|
|
|
return $this->fontName; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
public function getFontColor(): ?string |
53
|
|
|
{ |
54
|
|
|
return $this->fontColor; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
public function getFontSize(): ?int |
58
|
|
|
{ |
59
|
|
|
return $this->fontSize; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
public function getLineHeight(): ?int |
63
|
|
|
{ |
64
|
|
|
return $this->lineHeight; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
public function getLinkStyle(): ?TextStyle |
68
|
|
|
{ |
69
|
|
|
return $this->linkStyle; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
public function setBackgroundColor($backgroundColor): void |
73
|
|
|
{ |
74
|
|
|
$this->backgroundColor = $backgroundColor; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
public function setFontName($fontName): void |
78
|
|
|
{ |
79
|
|
|
$this->fontName = $fontName; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
public function setFontColor($fontColor): void |
83
|
|
|
{ |
84
|
|
|
$this->fontColor = $fontColor; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
public function setFontSize($fontSize): void |
88
|
|
|
{ |
89
|
|
|
$this->fontSize = $fontSize; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
public function setLineHeight($lineHeight): void |
93
|
|
|
{ |
94
|
|
|
$this->lineHeight = $lineHeight; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
public function setLinkStyle($linkStyle): void |
98
|
|
|
{ |
99
|
|
|
$this->linkStyle = $linkStyle; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
public function getParagraphSpacingBefore(): ?int |
103
|
|
|
{ |
104
|
|
|
return $this->paragraphSpacingBefore; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
public function setParagraphSpacingBefore(?int $paragraphSpacingBefore): void |
108
|
|
|
{ |
109
|
|
|
$this->paragraphSpacingBefore = $paragraphSpacingBefore; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
public function getParagraphSpacingAfter(): ?int |
113
|
|
|
{ |
114
|
|
|
return $this->paragraphSpacingAfter; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
public function setParagraphSpacingAfter(?int $paragraphSpacingAfter): void |
118
|
|
|
{ |
119
|
|
|
$this->paragraphSpacingAfter = $paragraphSpacingAfter; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
public function getTextColor(): ?string |
123
|
|
|
{ |
124
|
|
|
return $this->textColor; |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
public function setTextColor(?string $textColor): void |
128
|
|
|
{ |
129
|
|
|
$this->textColor = $textColor; |
130
|
|
|
} |
131
|
|
|
} |
132
|
|
|
|