function DataFieldRow::render
Renders a row object.
This usually passes through to a theme template of some form, but not always.
Parameters
object $row: A single row of the query result, so an element of $view->result.
Return value
string The rendered output of a single row, used by the style plugin.
Overrides RowPluginBase::render
File
- 
              core/modules/ rest/ src/ Plugin/ views/ row/ DataFieldRow.php, line 137 
Class
- DataFieldRow
- Plugin which displays fields as raw data.
Namespace
Drupal\rest\Plugin\views\rowCode
public function render($row) {
  $output = [];
  foreach ($this->view->field as $id => $field) {
    // If the raw output option has been set, just get the raw value.
    if (!empty($this->rawOutputOptions[$id])) {
      $value = $field->getValue($row);
    }
    else {
      // Advanced render for token replacement.
      $markup = $field->advancedRender($row);
      // Post render to support uncacheable fields.
      $field->postRender($row, $markup);
      $value = $field->last_render;
    }
    // Omit excluded fields from the rendered output.
    if (empty($field->options['exclude'])) {
      $output[$this->getFieldKeyAlias($id)] = $value;
    }
  }
  return $output;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
