You are here

public function TranslationCountField::query in Translation Views 8

Called to add the field to a query.

Overrides FieldPluginBase::query

File

src/Plugin/views/field/TranslationCountField.php, line 54

Class

TranslationCountField
Show translation count.

Namespace

Drupal\translation_views\Plugin\views\field

Code

public function query() {

  /** @var \Drupal\views\Plugin\views\query\Sql $query */
  $query = $this->query;
  $join_alias = $this
    ->joinLanguages($query);
  $this->field_alias = $query
    ->addField($join_alias, 'count_langs', $this->realField);
}