public function EntityTranslation::get

Implements TypedDataInterface::get().

Overrides ComplexDataInterface::get

2 calls to EntityTranslation::get()
EntityTranslation::getProperties in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php
Implements ComplexDataInterface::getProperties().
EntityTranslation::__get in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php
Magic getter: Gets the translated property.

File

drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php, line 135
Definition of Drupal\Core\Entity\Type\EntityTranslation.

Class

EntityTranslation
Makes translated entity properties available via the Field API.

Namespace

Drupal\Core\Entity\Field\Type

Code

public function get($property_name) {
  $definitions = $this
    ->getPropertyDefinitions();
  if (!isset($definitions[$property_name])) {
    throw new InvalidArgumentException(format_string('Field @name is unknown or not translatable.', array(
      '@name' => $property_name,
    )));
  }
  return $this->properties[$property_name];
}