|
4 | 4 |
|
5 | 5 | namespace PHPForge\Html\Attribute\Component; |
6 | 6 |
|
7 | | -use PHPForge\Html\Helper\{CssClass, Encode}; |
8 | | -use PHPForge\Widget\ElementInterface; |
| 7 | +use PHPForge\Html\{Helper\CssClass, Helper\Sanitize, Interop\RenderInterface}; |
9 | 8 |
|
10 | 9 | /** |
11 | 10 | * Is used by widgets that implement brand collection. |
@@ -88,14 +87,14 @@ public function brandContainerTag(string $value): static |
88 | 87 | /** |
89 | 88 | * Set the brand image. |
90 | 89 | * |
91 | | - * @param ElementInterface|string $value The brand image. |
| 90 | + * @param RenderInterface|string $value The brand image. |
92 | 91 | * |
93 | 92 | * @return static A new instance of the current class with the specified brand image. |
94 | 93 | */ |
95 | | - public function brandImage(string|ElementInterface $value): static |
| 94 | + public function brandImage(string|RenderInterface $value): static |
96 | 95 | { |
97 | 96 | $new = clone $this; |
98 | | - $new->brandImage = Encode::sanitizeXSS($value); |
| 97 | + $new->brandImage = Sanitize::html($value); |
99 | 98 |
|
100 | 99 | return $new; |
101 | 100 | } |
@@ -163,29 +162,29 @@ public function brandTemplate(string $value): static |
163 | 162 | /** |
164 | 163 | * Set the brand text. |
165 | 164 | * |
166 | | - * @param ElementInterface|string $value The brand text. |
| 165 | + * @param RenderInterface|string $value The brand text. |
167 | 166 | * |
168 | 167 | * @return static A new instance of the current class with the specified brand text. |
169 | 168 | */ |
170 | | - public function brandText(string|ElementInterface $value): static |
| 169 | + public function brandText(string|RenderInterface $value): static |
171 | 170 | { |
172 | 171 | $new = clone $this; |
173 | | - $new->brandText = Encode::sanitizeXSS($value); |
| 172 | + $new->brandText = Sanitize::html($value); |
174 | 173 |
|
175 | 174 | return $new; |
176 | 175 | } |
177 | 176 |
|
178 | 177 | /** |
179 | 178 | * Set the brand toggle. |
180 | 179 | * |
181 | | - * @param ElementInterface|string $value The brand toggle. |
| 180 | + * @param RenderInterface|string $value The brand toggle. |
182 | 181 | * |
183 | 182 | * @return static A new instance of the current class with the specified brand toggle. |
184 | 183 | */ |
185 | | - public function brandToggle(string|ElementInterface $value): static |
| 184 | + public function brandToggle(string|RenderInterface $value): static |
186 | 185 | { |
187 | 186 | $new = clone $this; |
188 | | - $new->brandToggle = Encode::sanitizeXSS($value); |
| 187 | + $new->brandToggle = Sanitize::html($value); |
189 | 188 |
|
190 | 189 | return $new; |
191 | 190 | } |
|
0 commit comments