1 token.inc token_render_array_value($value, array $options = array())

Renders a render array for display as a token.

Parameters

string $value: Value OR Render array.

array $options: Array of options for rendering. Values can include:

Return value

HTML of rendered item.:

See also

token_render_array_value()

File

core/includes/token.inc, line 860
Backdrop placeholder/token replacement system.

Code

function token_render_array_value($value, array $options = array()) {
  $rendered = is_array($value) ? render($value) : (string) $value;
  if (!empty($options['sanitize'])) {
    $rendered = check_plain($rendered);
  }
  return $rendered;
}