You are here

public function TranslationLanguageRenderer::render in Drupal 9

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

Renders entity data.

Parameters

\Drupal\views\ResultRow $row: A single row of the query result.

Return value

array A renderable array for the entity data contained in the result row.

Overrides EntityTranslationRendererBase::render

File

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

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];
}