function FormattableMarkup::placeholderEscape
Same name in other branches
- 9 core/lib/Drupal/Component/Render/FormattableMarkup.php \Drupal\Component\Render\FormattableMarkup::placeholderEscape()
- 8.9.x core/lib/Drupal/Component/Render/FormattableMarkup.php \Drupal\Component\Render\FormattableMarkup::placeholderEscape()
- 11.x core/lib/Drupal/Component/Render/FormattableMarkup.php \Drupal\Component\Render\FormattableMarkup::placeholderEscape()
Escapes a placeholder replacement value if needed.
Parameters
string|\Drupal\Component\Render\MarkupInterface $value: A placeholder replacement value.
Return value
string The properly escaped replacement value.
1 call to FormattableMarkup::placeholderEscape()
- FormattableMarkup::placeholderFormat in core/
lib/ Drupal/ Component/ Render/ FormattableMarkup.php - Replaces placeholders in a string with values.
File
-
core/
lib/ Drupal/ Component/ Render/ FormattableMarkup.php, line 267
Class
- FormattableMarkup
- Formats a string for HTML display by replacing variable placeholders.
Namespace
Drupal\Component\RenderCode
protected static function placeholderEscape($value) {
return $value instanceof MarkupInterface ? (string) $value : Html::escape($value);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.