DefaultLanguageRenderer
class DefaultLanguageRenderer extends EntityTranslationRendererBase (View source)
Renders entities in their default language.
Properties
| ViewExecutable | $view | The view executable wrapping the view storage entity. |
from RendererBase |
| protected LanguageManagerInterface | $languageManager | The language manager. |
from RendererBase |
| protected EntityTypeInterface | $entityType | The type of the entity being rendered. |
from RendererBase |
| protected array | $build | Contains an array of render arrays, one for each rendered entity. |
from RendererBase |
Methods
Constructs a renderer object.
Details
__construct(ViewExecutable $view, LanguageManagerInterface $language_manager, EntityTypeInterface $entity_type)
Constructs a renderer object.
int
getCacheMaxAge()
The maximum age for which this object may be cached.
string[]
getCacheContexts()
The cache contexts associated with this object.
These identify a specific variation/representation of the object.
Cache contexts are tokens: placeholders that are converted to cache keys by the @cache_contexts_manager service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache.
string[]
getCacheTags()
The cache tags associated with this object.
When this object is modified, these cache tags will be invalidated.
query(QueryPluginBase $query, string $relationship = NULL)
Alters the query if needed.
preRender(array $result)
Runs before each entity is rendered.
array
render(ResultRow $row)
Renders entity data.
string
getLangcode(ResultRow $row)
Returns the language code associated with the given row.