trait EntityTranslationRenderTrait (View source)

Trait used to instantiate the view's entity translation renderer.

Properties

protected EntityTranslationRendererBase $entityTranslationRenderer

The renderer to be used to render the entity row.

Methods

getEntityTranslation(EntityInterface $entity, ResultRow $row)

Returns the entity translation matching the configured row language.

string
getEntityTypeId()

Returns the entity type identifier.

getEntityTypeManager()

Returns the entity type manager.

getEntityRepository()

Returns the entity repository.

getLanguageManager()

Returns the language manager.

getView()

Returns the top object of a view.

Details

protected EntityTranslationRendererBase getEntityTranslationRenderer()

Returns the current renderer.

Return Value

EntityTranslationRendererBase

The configured renderer.

FieldableEntityInterface getEntityTranslation(EntityInterface $entity, ResultRow $row)

Returns the entity translation matching the configured row language.

Parameters

EntityInterface $entity

The entity object the field value being processed is attached to.

ResultRow $row

The result row the field value being processed belongs to.

Return Value

FieldableEntityInterface

The entity translation object for the specified row.

abstract string getEntityTypeId()

Returns the entity type identifier.

Return Value

string

The entity type identifier.

protected EntityTypeManagerInterface getEntityTypeManager()

Returns the entity type manager.

Return Value

EntityTypeManagerInterface

The entity type manager.

protected EntityRepositoryInterface getEntityRepository()

Returns the entity repository.

Return Value

EntityRepositoryInterface

The entity repository.

abstract protected LanguageManagerInterface getLanguageManager()

Returns the language manager.

Return Value

LanguageManagerInterface

The language manager.

abstract protected ViewExecutable getView()

Returns the top object of a view.

Return Value

ViewExecutable

The view object.