You are here

class DefaultLanguageRenderer in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php \Drupal\views\Entity\Render\DefaultLanguageRenderer
  2. 9 core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php \Drupal\views\Entity\Render\DefaultLanguageRenderer

Renders entities in their default language.

Hierarchy

Expanded class hierarchy of DefaultLanguageRenderer

1 string reference to 'DefaultLanguageRenderer'
EntityTranslationRenderTrait::getEntityTranslationRenderer in core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php
Returns the current renderer.

File

core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php, line 10

Namespace

Drupal\views\Entity\Render
View source
class DefaultLanguageRenderer extends EntityTranslationRendererBase {

  /**
   * {@inheritdoc}
   */
  public function getLangcode(ResultRow $row) {
    return $row->_entity
      ->getUntranslated()
      ->language()
      ->getId();
  }

}

Members