public function EntityNG::get

Implements ComplexDataInterface::get().

Overrides Entity::get

3 calls to EntityNG::get()
EntityNG::getProperties in drupal/core/lib/Drupal/Core/Entity/EntityNG.php
Implements ComplexDataInterface::getProperties().
EntityNG::__get in drupal/core/lib/Drupal/Core/Entity/EntityNG.php
Magic getter: Gets the property in default language.
EntityNG::__isset in drupal/core/lib/Drupal/Core/Entity/EntityNG.php
Magic method.

File

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

Class

EntityNG
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function get($property_name) {

  // Values in default language are always stored using the LANGUAGE_DEFAULT
  // constant.
  if (!isset($this->fields[$property_name][LANGUAGE_DEFAULT])) {
    return $this
      ->getTranslatedField($property_name, LANGUAGE_DEFAULT);
  }
  return $this->fields[$property_name][LANGUAGE_DEFAULT];
}