public function Entity::translations

Returns the languages the entity is translated to.

@todo: Remove once all entity types implement the entity field API. This is deprecated by Drupal\Core\TypedData\TranslatableInterface::getTranslationLanguages().

File

drupal/core/lib/Drupal/Core/Entity/Entity.php, line 283
Definition of Drupal\Core\Entity\Entity.

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function translations() {
  return $this
    ->getTranslationLanguages(FALSE);
}