You are here

public function TranslationStatus::render in Translation Views 8

Convert translation status value into TranslationStatusInterface values.

Overrides Boolean::render

File

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

Class

TranslationStatus
Provides a field that adds translation status.

Namespace

Drupal\translation_views\Plugin\views\field

Code

public function render(ResultRow $values) {
  $values->{$this->field_alias} = $values->{$this->field_alias} > 0 ? TranslationStatusInterface::TRANSLATION_EXISTING : NULL;
  return parent::render($values);
}