You are here

public function TranslationLanguageRenderer::render in Display Suite 8.4

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php \Drupal\ds\Plugin\views\Entity\Render\TranslationLanguageRenderer::render()
  2. 8.3 src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php \Drupal\ds\Plugin\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

src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php, line 52

Class

TranslationLanguageRenderer
Renders entities in the current language.

Namespace

Drupal\ds\Plugin\views\Entity\Render

Code

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