You are here

public function EntityTranslationDefaultHandler::loadTranslations in Entity Translation 7

Overrides EntityTranslationHandlerInterface::loadTranslations

See also

EntityTranslationHandlerInterface::loadTranslations()

1 call to EntityTranslationDefaultHandler::loadTranslations()
EntityTranslationDefaultHandler::getTranslations in includes/translation.handler.inc

File

includes/translation.handler.inc, line 560
Default translation handler for the translation module.

Class

EntityTranslationDefaultHandler
Class implementing the default entity translation behaviours.

Code

public function loadTranslations() {
  if (isset($this->entityId)) {
    $this
      ->loadMultiple($this->entityType, array(
      $this->entityId => $this->entity,
    ));
  }
  elseif ($translations_key = $this
    ->getTranslationsKey()) {
    $this->entity->{$translations_key} = $this
      ->emptyTranslations();
  }
}