public function DefaultLanguageRenderer::getLangcode in Display Suite 8.2
Same name and namespace in other branches
- 8.4 src/Plugin/views/Entity/Render/DefaultLanguageRenderer.php \Drupal\ds\Plugin\views\Entity\Render\DefaultLanguageRenderer::getLangcode()
- 8.3 src/Plugin/views/Entity/Render/DefaultLanguageRenderer.php \Drupal\ds\Plugin\views\Entity\Render\DefaultLanguageRenderer::getLangcode()
Returns the language code associated to the given row.
Parameters
\Drupal\views\ResultRow $row: The result row.
Return value
string A language code.
Overrides EntityTranslationRendererBase::getLangcode
1 method overrides DefaultLanguageRenderer::getLangcode()
- TranslationLanguageRenderer::getLangcode in src/
Plugin/ views/ Entity/ Render/ TranslationLanguageRenderer.php - Returns the language code associated to the given row.
File
- src/
Plugin/ views/ Entity/ Render/ DefaultLanguageRenderer.php, line 21
Class
- DefaultLanguageRenderer
- Renders entities in the current language.
Namespace
Drupal\ds\Plugin\views\Entity\RenderCode
public function getLangcode(ResultRow $row, $relationship = NULL) {
return $row->_entity
->getUntranslated()
->language()
->getId();
}