Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297408

The documentation for the function FormattableMarkup::placeholderFormat contains typos

$
0
0

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Rend...

Expected result

$this->placeholderFormat('<a href=":foo">link text</a>, [':foo' => $some_variable]);
$this->placeholderFormat('<a href=":foo" title="static text">link text</a>, [':foo' => $some_variable]);
$this->placeholderFormat('<a href=":foo">@foo</a>, [':foo' => $some_variable]);
// Use : placeholder inside an HTML tag.
$this->placeholderFormat('<img src=":foo" />, [':foo' => '/image.png']);

Actual result

$this->placeholderFormat('<a href=":foo">link text</a>, ['@foo' => $some_variable]);
$this->placeholderFormat('<a href=":foo" title="static text">link text</a>, ['@foo' => $some_variable]);
$this->placeholderFormat('<a href=":foo">@foo</a>, ['@foo' => $some_variable]);
// Use : placeholder inside an HTML tag.
$this->placeholderFormat('<img src=":foo" />, ['@foo' => '/image.png']);

Viewing all articles
Browse latest Browse all 297408

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>