You are here

public function DefaultLanguageRenderer::getLangcode in Views Parity Row 8

Returns the language code associated to the given row.

Parameters

\Drupal\views\ResultRow $row: The result row.

Return value

string A language code.

File

src/Plugin/views/Entity/Render/DefaultLanguageRenderer.php, line 23

Class

DefaultLanguageRenderer
Renders entities in the current language.

Namespace

Drupal\views_parity_row\Plugin\views\Entity\Render

Code

public function getLangcode(ResultRow $row) {
  return $row->_entity
    ->getUntranslated()
    ->language()->id;
}