1010namespace Nette \Forms \Rendering ;
1111
1212use Nette ;
13+ use Nette \HtmlStringable ;
1314use Nette \Utils \Html ;
14- use Nette \Utils \IHtmlString ;
1515
1616
1717/**
@@ -232,7 +232,7 @@ private function doRenderErrors(array $errors, bool $control): string
232232
233233 foreach ($ errors as $ error ) {
234234 $ item = clone $ item ;
235- if ($ error instanceof IHtmlString ) {
235+ if ($ error instanceof HtmlStringable ) {
236236 $ item ->addHtml ($ error );
237237 } else {
238238 $ item ->setText ($ error );
@@ -274,7 +274,7 @@ public function renderBody(): string
274274 $ s .= "\n" . $ container ->startTag ();
275275
276276 $ text = $ group ->getOption ('label ' );
277- if ($ text instanceof IHtmlString ) {
277+ if ($ text instanceof HtmlStringable ) {
278278 $ s .= $ this ->getWrapper ('group label ' )->addHtml ($ text );
279279
280280 } elseif ($ text != null ) { // intentionally ==
@@ -285,7 +285,7 @@ public function renderBody(): string
285285 }
286286
287287 $ text = $ group ->getOption ('description ' );
288- if ($ text instanceof IHtmlString ) {
288+ if ($ text instanceof HtmlStringable ) {
289289 $ s .= $ text ;
290290
291291 } elseif ($ text != null ) { // intentionally ==
@@ -389,7 +389,7 @@ public function renderPairMulti(array $controls): string
389389 throw new Nette \InvalidArgumentException ('Argument must be array of Nette\Forms\IControl instances. ' );
390390 }
391391 $ description = $ control ->getOption ('description ' );
392- if ($ description instanceof IHtmlString ) {
392+ if ($ description instanceof HtmlStringable ) {
393393 $ description = ' ' . $ description ;
394394
395395 } elseif ($ description != null ) { // intentionally ==
@@ -453,7 +453,7 @@ public function renderControl(Nette\Forms\Control $control): Html
453453 }
454454
455455 $ description = $ control ->getOption ('description ' );
456- if ($ description instanceof IHtmlString ) {
456+ if ($ description instanceof HtmlStringable ) {
457457 $ description = ' ' . $ description ;
458458
459459 } elseif ($ description != null ) { // intentionally ==
0 commit comments