private function Flow_setRelatedEntities()
{
if (property_exists($this, 'Flow_Persistence_RelatedEntities') && is_array($this->Flow_Persistence_RelatedEntities)) {
$persistenceManager = Bootstrap::$staticObjectManager->get(PersistenceManagerInterface::class);
foreach ($this->Flow_Persistence_RelatedEntities as $entityInformation) {
if ($entityInformation['entityType'] === ResourcePointer::class) {
continue;
}
$entity = $persistenceManager->getObjectByIdentifier($entityInformation['identifier'], $entityInformation['entityType'], true);
if (isset($entityInformation['entityPath'])) {
$this->{$entityInformation['propertyName']} = Arrays::setValueByPath($this->{$entityInformation['propertyName']}, $entityInformation['entityPath'], $entity);
} else {
$this->{$entityInformation['propertyName']} = $entity;
}
}
unset($this->Flow_Persistence_RelatedEntities);
}
}