You are here

public function EntityFieldExport::render_item in REST Views 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/views/field/EntityFieldExport.php \Drupal\rest_views\Plugin\views\field\EntityFieldExport::render_item()

Renders a single item of a row.

Parameters

int $count: The index of the item inside the row.

mixed $item: The item for the field to render.

Return value

string The rendered output.

Overrides EntityField::render_item

File

src/Plugin/views/field/EntityFieldExport.php, line 45

Class

EntityFieldExport
Display entity field data in a serialized display.

Namespace

Drupal\rest_views\Plugin\views\field

Code

public function render_item($count, $item) {
  $rendered = $item['rendered'];
  if (isset($rendered['#type']) && $rendered['#type'] === 'data') {
    return $rendered['#data'];
  }
  return parent::render_item($count, $item);
}