public function LoadLocalEntityEvent::setEntity in Acquia Content Hub 8.2
Set the entity that was loaded and add it to the stack.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity object.
Throws
\Exception
File
- src/
Event/ LoadLocalEntityEvent.php, line 102
Class
- LoadLocalEntityEvent
- Class LoadLocalEntityEvent.
Namespace
Drupal\acquia_contenthub\EventCode
public function setEntity(EntityInterface $entity) : void {
$wrapper = new DependentEntityWrapper($entity);
$wrapper
->setRemoteUuid($this
->getCdf()
->getUuid());
$this->stack
->addDependency($wrapper);
$this->entity = $entity;
}