You are here

public function SimilarTermsField::query in Similar By Terms 8

Called to add the field to a query.

Overrides FieldPluginBase::query

File

src/Plugin/views/field/SimilarTermsField.php, line 21

Class

SimilarTermsField
Shows the similarity of the node.

Namespace

Drupal\similarterms\Plugin\views\field

Code

public function query() {
  $params = [
    'function' => 'count',
  ];
  $this->field_alias = $this->query
    ->addField('node', 'nid', NULL, $params);
}