function EntityTranslationRendererBase::getLangcodeByRelationship
Same name in other branches
- 10 core/modules/views/src/Entity/Render/EntityTranslationRendererBase.php \Drupal\views\Entity\Render\EntityTranslationRendererBase::getLangcodeByRelationship()
Returns the language code associated with the given row.
Parameters
\Drupal\views\ResultRow $row: The result row.
string $relationship: The relationship to be used.
Return value
string
2 calls to EntityTranslationRendererBase::getLangcodeByRelationship()
- EntityTranslationRendererBase::preRenderByRelationship in core/
modules/ views/ src/ Entity/ Render/ EntityTranslationRendererBase.php - Runs before each entity is rendered if a relationship is needed.
- TranslationLanguageRenderer::preRenderByRelationship in core/
modules/ views/ src/ Entity/ Render/ TranslationLanguageRenderer.php - Runs before each entity is rendered if a relationship is needed.
1 method overrides EntityTranslationRendererBase::getLangcodeByRelationship()
- DefaultLanguageRenderer::getLangcodeByRelationship in core/
modules/ views/ src/ Entity/ Render/ DefaultLanguageRenderer.php - Returns the language code associated with the given row.
File
-
core/
modules/ views/ src/ Entity/ Render/ EntityTranslationRendererBase.php, line 35
Class
- EntityTranslationRendererBase
- Defines a base class for entity translation renderers.
Namespace
Drupal\views\Entity\RenderCode
public function getLangcodeByRelationship(ResultRow $row, string $relationship) : string {
// This method needs to be overridden if the relationship is needed in the
// implementation of getLangcode().
return $this->getLangcode($row);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.