You are here

public function EntityProcessorInterface::getEntityTranslation in Feeds 8.3

Returns a translation of the given entity.

If a translation of the requested language does not exist yet on the entity, one is created.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed that controls the import.

\Drupal\Core\Entity\TranslatableInterface $entity: A translatable entity.

string $langcode: The language in which to get the translation.

Return value

\Drupal\Core\Entity\EntityInterface The translated entity.

1 method overrides EntityProcessorInterface::getEntityTranslation()
EntityProcessorBase::getEntityTranslation in src/Feeds/Processor/EntityProcessorBase.php
Returns a translation of the given entity.

File

src/Plugin/Type/Processor/EntityProcessorInterface.php, line 32

Class

EntityProcessorInterface
Interface for Feeds entity processor plugins.

Namespace

Drupal\feeds\Plugin\Type\Processor

Code

public function getEntityTranslation(FeedInterface $feed, TranslatableInterface $entity, $langcode);