public function EntityBCDecorator::get

Forwards the call to the decorated entity.

Overrides ComplexDataInterface::get

File

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

Class

EntityBCDecorator
Provides backwards compatible (BC) access to entity fields.

Namespace

Drupal\Core\Entity

Code

public function get($property_name) {

  // Ensure this works with not yet defined fields.
  if (!isset($this->definitions[$property_name])) {
    return $this
      ->__get($property_name);
  }
  return $this->decorated
    ->get($property_name);
}