You are here

public function RendererBase::render in Display Suite 8.3

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

1 method overrides RendererBase::render()
TranslationLanguageRenderer::render in src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php
Renders entity data.

File

src/Plugin/views/Entity/Render/RendererBase.php, line 24

Class

RendererBase
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);
  if (isset($this->build[$entity_id][$langcode])) {
    $build = $this->build[$entity_id][$langcode];
    $this
      ->alterBuild($build, $row);
    return $build;
  }
  return [];
}