Neos\Flow\ObjectManagement\Proxy\ObjectSerializationTrait::Flow_setRelatedEntities PHP 메소드

Flow_setRelatedEntities() 개인적인 메소드

Used in __wakeup methods of proxy classes. Note: This method adds code which ignores objects of type Neos\Flow\ResourceManagement\ResourcePointer in order to provide backwards compatibility data generated with Flow 2.2.x which still provided that class.
private Flow_setRelatedEntities ( ) : void
리턴 void
    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);
        }
    }