public function Message::render

File

src/Plugin/views/field/Message.php, line 58

Class

Message
Provides a field handler that renders a log message with replaced variables.

Namespace

Drupal\tmgmt\Plugin\views\field

Code

public function render(ResultRow $values) {
  $value = $this
    ->getValue($values);
  if ($this->options['replace_variables']) {
    $variables = unserialize($this
      ->getvalue($values, 'variables'));
    return new FormattableMarkup($value, (array) $variables);
  }
  else {
    return $this
      ->sanitizeValue($value);
  }
}