Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Markup.php

function Markup::render

Overrides FieldPluginBase::render

File

core/modules/views/src/Plugin/views/field/Markup.php, line 45

Class

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

Namespace

Drupal\views\Plugin\views\field

Code

public function render(ResultRow $values) {
    $value = $this->getValue($values);
    if (is_array($this->format)) {
        $format = $this->getValue($values, 'format');
    }
    else {
        $format = $this->format;
    }
    if ($value) {
        $value = str_replace('<!--break-->', '', $value);
        return check_markup($value, $format);
    }
}
RSS feed
Powered by Drupal