You are here

public function EntityAdapter::getEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\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 176

Class

EntityAdapter
Defines the "entity" data type.

Namespace

Drupal\Core\Entity\Plugin\DataType

Code

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