You are here

public function TranslationStatus::query in Translation Views 8

Expression wouldn't work without:

Overrides FieldPluginBase::query

See also

translation_views_query_views_alter()

File

src/Plugin/views/field/TranslationStatus.php, line 83

Class

TranslationStatus
Provides a field that adds translation status.

Namespace

Drupal\translation_views\Plugin\views\field

Code

public function query() {
  $table_alias = $this
    ->ensureMyTable();
  $this->query
    ->addField(NULL, "FIND_IN_SET(:langcode, {$table_alias}.langs) > 0", 'translation_status', [
    'placeholders' => [
      ':langcode' => '***TRANSLATION_VIEWS_TARGET_LANG***',
    ],
  ]);
}