class DefaultLanguageRenderer in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php \Drupal\views\Entity\Render\DefaultLanguageRenderer
Renders entities in their default language.
Hierarchy
- class \Drupal\views\Entity\Render\RendererBase implements CacheableDependencyInterface
- class \Drupal\views\Entity\Render\EntityTranslationRendererBase
- class \Drupal\views\Entity\Render\DefaultLanguageRenderer
- class \Drupal\views\Entity\Render\EntityTranslationRendererBase
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 15 - Contains \Drupal\views\Entity\Render\DefaultLanguageRenderer.
Namespace
Drupal\views\Entity\RenderView source
class DefaultLanguageRenderer extends EntityTranslationRendererBase {
/**
* {@inheritdoc}
*/
public function getLangcode(ResultRow $row) {
return $row->_entity
->getUntranslated()
->language()
->getId();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultLanguageRenderer:: |
public | function |
Returns the language code associated with the given row. Overrides EntityTranslationRendererBase:: |
|
EntityTranslationRendererBase:: |
public | function |
Runs before each entity is rendered. Overrides RendererBase:: |
1 |
EntityTranslationRendererBase:: |
public | function |
Alters the query if needed. Overrides RendererBase:: |
1 |
EntityTranslationRendererBase:: |
public | function |
Renders entity data. Overrides RendererBase:: |
1 |
RendererBase:: |
protected | property | Contains an array of render arrays, one for each rendered entity. | |
RendererBase:: |
protected | property | The type of the entity being rendered. | |
RendererBase:: |
protected | property | The language manager. | |
RendererBase:: |
public | property | The view executable wrapping the view storage entity. | |
RendererBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyInterface:: |
2 |
RendererBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyInterface:: |
|
RendererBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyInterface:: |
|
RendererBase:: |
public | function | Constructs a renderer object. | 2 |