public function Entity::get

Implements \Drupal\Core\Entity\EntityInterface::get().

Overrides ComplexDataInterface::get

2 methods override Entity::get()
ConfigEntityBase::get in drupal/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Overrides Entity::get().
EntityNG::get in drupal/core/lib/Drupal/Core/Entity/EntityNG.php
Implements \Drupal\Core\TypedData\ComplexDataInterface::get().

File

drupal/core/lib/Drupal/Core/Entity/Entity.php, line 200
Contains \Drupal\Core\Entity\Entity.

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function get($property_name, $langcode = NULL) {

  // @todo: Replace by EntityNG implementation once all entity types have been
  // converted to use the entity field API.
  return isset($this->{$property_name}) ? $this->{$property_name} : NULL;
}