class CurrentLanguageRenderer in Display Suite 8.3
Same name and namespace in other branches
- 8.4 src/Plugin/views/Entity/Render/CurrentLanguageRenderer.php \Drupal\ds\Plugin\views\Entity\Render\CurrentLanguageRenderer
- 8.2 src/Plugin/views/Entity/Render/CurrentLanguageRenderer.php \Drupal\ds\Plugin\views\Entity\Render\CurrentLanguageRenderer
Renders entities in the current language.
Hierarchy
- class \Drupal\views\Entity\Render\RendererBase implements CacheableDependencyInterface
- class \Drupal\views\Entity\Render\EntityTranslationRendererBase
- class \Drupal\ds\Plugin\views\Entity\Render\RendererBase
- class \Drupal\ds\Plugin\views\Entity\Render\CurrentLanguageRenderer
- class \Drupal\ds\Plugin\views\Entity\Render\RendererBase
- class \Drupal\views\Entity\Render\EntityTranslationRendererBase
Expanded class hierarchy of CurrentLanguageRenderer
File
- src/
Plugin/ views/ Entity/ Render/ CurrentLanguageRenderer.php, line 10
Namespace
Drupal\ds\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.
*
* @return string
*/
public function getLangcode(ResultRow $row) {
return $this->languageManager
->getCurrentLanguage()
->getId();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CurrentLanguageRenderer:: |
public | function |
Returns NULL so that the current language is used. Overrides EntityTranslationRendererBase:: |
|
EntityTranslationRendererBase:: |
public | function |
Alters the query if needed. 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:: |
protected | function | Alter the build. | |
RendererBase:: |
protected | function | Pre renders all the Display Suite rows. | |
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 EntityTranslationRendererBase:: |
1 |
RendererBase:: |
public | function |
Renders entity data. Overrides EntityTranslationRendererBase:: |
1 |
RendererBase:: |
public | function | Constructs a renderer object. | 2 |