class CurrentLanguageRenderer in Views Parity Row 8
Renders entities in the current language.
Hierarchy
- class \Drupal\views\Entity\Render\RendererBase implements CacheableDependencyInterface
- class \Drupal\views_parity_row\Plugin\views\Entity\Render\RendererBase
- class \Drupal\views_parity_row\Plugin\views\Entity\Render\CurrentLanguageRenderer
- class \Drupal\views_parity_row\Plugin\views\Entity\Render\RendererBase
Expanded class hierarchy of CurrentLanguageRenderer
1 string reference to 'CurrentLanguageRenderer'
- EntityRow::getEntityTranslationRenderer in src/
Plugin/ views/ row/ EntityRow.php - Returns the current renderer.
File
- src/
Plugin/ views/ Entity/ Render/ CurrentLanguageRenderer.php, line 13
Namespace
Drupal\views_parity_row\Plugin\views\Entity\RenderView source
class CurrentLanguageRenderer extends RendererBase {
/**
* Returns NULL so that the current language is used.
*
* @param \Drupal\views\ResultRow $row
* The result row.
*/
public function getLangcode(ResultRow $row) {
}
/**
* {@inheritdoc}
*/
public function query(QueryPluginBase $query, $relationship = NULL) {
}
/**
* {@inheritdoc}
*/
public function render(ResultRow $row) {
$entity_id = $row->_entity
->id();
return $this->build[$entity_id];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CurrentLanguageRenderer:: |
public | function | Returns NULL so that the current language is used. | |
CurrentLanguageRenderer:: |
public | function |
Alters the query if needed. Overrides RendererBase:: |
|
CurrentLanguageRenderer:: |
public | function |
Renders entity data. Overrides RendererBase:: |
|
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 |
Runs before each entity is rendered. Overrides RendererBase:: |
|
RendererBase:: |
public | function | Constructs a renderer object. | 2 |