You are here

public function CurrentLanguageRenderer::getLangcode in Display Suite 8.3

Same name and namespace in other branches
  1. 8.4 src/Plugin/views/Entity/Render/CurrentLanguageRenderer.php \Drupal\ds\Plugin\views\Entity\Render\CurrentLanguageRenderer::getLangcode()
  2. 8.2 src/Plugin/views/Entity/Render/CurrentLanguageRenderer.php \Drupal\ds\Plugin\views\Entity\Render\CurrentLanguageRenderer::getLangcode()

Returns NULL so that the current language is used.

Parameters

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

Return value

string

Overrides EntityTranslationRendererBase::getLangcode

File

src/Plugin/views/Entity/Render/CurrentLanguageRenderer.php, line 20

Class

CurrentLanguageRenderer
Renders entities in the current language.

Namespace

Drupal\ds\Plugin\views\Entity\Render

Code

public function getLangcode(ResultRow $row) {
  return $this->languageManager
    ->getCurrentLanguage()
    ->getId();
}