function TranslationLanguageRenderer::render

Same name in other branches
  1. 8.9.x core/modules/views/src/Entity/Render/TranslationLanguageRenderer.php \Drupal\views\Entity\Render\TranslationLanguageRenderer::render()

Overrides EntityTranslationRendererBase::render

File

core/modules/views/src/Entity/Render/TranslationLanguageRenderer.php, line 96

Class

TranslationLanguageRenderer
Renders entity translations in their row language.

Namespace

Drupal\views\Entity\Render

Code

public function render(ResultRow $row) {
    $entity_id = $row->_entity
        ->id();
    $langcode = $this->getLangcode($row);
    return $this->build[$entity_id][$langcode];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.