You are here

public function Transaction::getTargetEntity in Transaction 8

Get the transaction target entity.

Return value

\Drupal\Core\Entity\ContentEntityInterface The transaction's target entity.

Overrides TransactionInterface::getTargetEntity

File

src/Entity/Transaction.php, line 485

Class

Transaction
Provides the transaction content entity.

Namespace

Drupal\transaction\Entity

Code

public function getTargetEntity() {
  return $this
    ->get('target_entity')
    ->isEmpty() ? NULL : $this
    ->get('target_entity')->entity;
}