DefaultLanguageRenderer.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\views\Entity\RenderFile
core/modules/views/src/Entity/Render/DefaultLanguageRenderer.phpView source
<?php
namespace Drupal\views\Entity\Render;
use Drupal\views\ResultRow;
/**
* Renders entities in their default language.
*/
class DefaultLanguageRenderer extends EntityTranslationRendererBase {
/**
* {@inheritdoc}
*/
public function getLangcode(ResultRow $row) {
return $row->_entity
->getUntranslated()
->language()
->getId();
}
}
Classes
Name | Description |
---|---|
DefaultLanguageRenderer | Renders entities in their default language. |