You are here

public function Log::getSourceEntity in Commerce Core 8.2

Gets the source entity.

Return value

\Drupal\Core\Entity\ContentEntityInterface The source entity.

Overrides LogInterface::getSourceEntity

File

modules/log/src/Entity/Log.php, line 107

Class

Log
Defines the log entity class.

Namespace

Drupal\commerce_log\Entity

Code

public function getSourceEntity() {
  return \Drupal::entityTypeManager()
    ->getStorage($this
    ->getSourceEntityTypeId())
    ->load($this
    ->getSourceEntityId());
}