diff options
author | quietone <quietone@2572884.no-reply.drupal.org> | 2025-04-25 20:25:21 +1200 |
---|---|---|
committer | quietone <quietone@2572884.no-reply.drupal.org> | 2025-04-25 20:25:21 +1200 |
commit | 7caa7cbd5975878c62d79e8ce7ca1274ce6a0d87 (patch) | |
tree | 1b1361f594d31cb850e042b84e2ec9149a22eda2 /core | |
parent | 9e32cb48ed02428a8efb97b5d48d5e09053b5067 (diff) | |
download | drupal-7caa7cbd5975878c62d79e8ce7ca1274ce6a0d87.tar.gz drupal-7caa7cbd5975878c62d79e8ce7ca1274ce6a0d87.zip |
Issue #3498468 by nexusnovaz, avpaderno, wombatbuddy, poker10: The example code given for FormattableMarkup::placeholderFormat() contains typos and syntax errors
Diffstat (limited to 'core')
-rw-r--r-- | core/lib/Drupal/Component/Render/FormattableMarkup.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/lib/Drupal/Component/Render/FormattableMarkup.php b/core/lib/Drupal/Component/Render/FormattableMarkup.php index 26fbc0b47c6..44e8171080a 100644 --- a/core/lib/Drupal/Component/Render/FormattableMarkup.php +++ b/core/lib/Drupal/Component/Render/FormattableMarkup.php @@ -113,11 +113,11 @@ class FormattableMarkup implements MarkupInterface, \Countable { * // 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. * |