You are here

function Markup::render in Views (for Drupal 7) 8.3

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides FieldPluginBase::render

File

lib/Drupal/views/Plugin/views/field/Markup.php, line 41
Definition of Drupal\views\Plugin\views\field\Markup.

Class

Markup
A handler to run a field through check_markup, using a companion format field.

Namespace

Drupal\views\Plugin\views\field

Code

function render($values) {
  $value = $this
    ->get_value($values);
  if (is_array($this->format)) {
    $format = $this
      ->get_value($values, 'format');
  }
  else {
    $format = $this->format;
  }
  if ($value) {
    $value = str_replace('<!--break-->', '', $value);
    return check_markup($value, $format, '');
  }
}