You are here

public function DependentEntityWrapper::getEntity in Dependency Calculation 8

Get the entity for which we are collecting dependencies.

Return value

\Drupal\Core\Entity\EntityInterface

Overrides DependentEntityWrapperInterface::getEntity

File

src/DependentEntityWrapper.php, line 106

Class

DependentEntityWrapper
An entity wrapper class for finding and tracking dependencies of an entity.

Namespace

Drupal\depcalc

Code

public function getEntity() {
  return \Drupal::service("entity.repository")
    ->loadEntityByUuid($this
    ->getEntityTypeId(), $this
    ->getUuid());
}