function EntityAdapter::getEntity

Returns the wrapped entity object.

Return value

\Drupal\Core\Entity\EntityInterface The wrapped entity object. If the entity is translatable and a specific translation is required, always request it by calling ::getTranslation() or ::getUntranslated() as the language of the returned object is not defined.

File

core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php, line 177

Class

EntityAdapter
Defines the "entity" data type.

Namespace

Drupal\Core\Entity\Plugin\DataType

Code

public function getEntity() {
  return $this->entity;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.