You are here

public function ViewsJsonField::query 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::query()

Called to add the field to a query.

Overrides FieldPluginBase::query

File

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

Class

ViewsJsonField
Base field handler for views_json_source.

Namespace

Drupal\views_json_source\Plugin\views\field

Code

public function query() {

  // Add the field.
  $this->table_alias = 'json';
  $this->field_alias = $this->query
    ->addField($this->table_alias, $this->options['key'], '', $this->options);
}