You are here

public function ViewsJsonField::render in Views Json Source 8

Same name and namespace in other branches
  1. 1.x src/Plugin/views/field/ViewsJsonField.php \Drupal\views_json_source\Plugin\views\field\ViewsJsonField::render()

Render.

Overrides FieldPluginBase::render

File

src/Plugin/views/field/ViewsJsonField.php, line 20

Class

ViewsJsonField
Base field handler for views_json_source.

Namespace

Drupal\views_json_source\Plugin\views\field

Code

public function render(ResultRow $values) {
  $key = $this->field_alias;
  if (!isset($values->{$key})) {
    return '';
  }
  $values = $values->{$key};
  return $this
    ->renderField($values);
}