Skip to content
Snippets Groups Projects

Issue #3498468: Fix placeholder syntax in FormattableMarkup for consistency

Closed Tyler Staples requested to merge issue/drupal-3498468:3498468-the-documentation-for into 11.x
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -113,11 +113,11 @@ public function jsonSerialize(): string {
* // Wraps $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $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]);
* $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">link text</a>', [':foo' => $some_variable]);
* // Use : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />, ['@foo' => '/image.png']);
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
Loading