You are here

protected static function FormattableMarkup::placeholderEscape in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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 258
Contains \Drupal\Component\Render\FormattableMarkup.

Class

FormattableMarkup
Formats a string for HTML display by replacing variable placeholders.

Namespace

Drupal\Component\Render

Code

protected static function placeholderEscape($value) {
  return SafeMarkup::isSafe($value) ? (string) $value : Html::escape($value);
}