public function TranslationLanguageRenderer::getLangcode in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Entity/Render/TranslationLanguageRenderer.php \Drupal\views\Entity\Render\TranslationLanguageRenderer::getLangcode()
- 9 core/modules/views/src/Entity/Render/TranslationLanguageRenderer.php \Drupal\views\Entity\Render\TranslationLanguageRenderer::getLangcode()
File
- core/
modules/ views/ src/ Entity/ Render/ TranslationLanguageRenderer.php, line 105
Class
- TranslationLanguageRenderer
- Renders entity translations in their row language.
Namespace
Drupal\views\Entity\RenderCode
public function getLangcode(ResultRow $row) {
return $row->{$this->langcodeAlias} ?? $this->languageManager
->getDefaultLanguage()
->getId();
}