Doctrine\ODM\PHPCR\UnitOfWork::doSaveTranslation PHP 메소드

doSaveTranslation() 개인적인 메소드

private doSaveTranslation ( $document, PHPCR\NodeInterface $node, $metadata )
$node PHPCR\NodeInterface
    private function doSaveTranslation($document, NodeInterface $node, $metadata)
    {
        if (!$this->isDocumentTranslatable($metadata)) {
            return;
        }
        $oid = spl_object_hash($document);
        if (!empty($this->documentTranslations[$oid])) {
            $strategy = $this->dm->getTranslationStrategy($metadata->translator);
            foreach ($this->documentTranslations[$oid] as $locale => $data) {
                if ($data) {
                    foreach ($data as $fieldName => $fieldValue) {
                        $this->originalTranslatedData[$oid][$locale][$fieldName] = $fieldValue;
                    }
                    $strategy->saveTranslation($data, $node, $metadata, $locale);
                } else {
                    $strategy->removeTranslation($document, $node, $metadata, $locale);
                    $class = $this->dm->getClassMetadata(get_class($document));
                    if ($invoke = $this->eventListenersInvoker->getSubscribedSystems($class, Event::postRemoveTranslation)) {
                        $this->eventListenersInvoker->invoke($class, Event::postRemoveTranslation, $document, new LifecycleEventArgs($document, $this->dm), $invoke);
                    }
                }
            }
        }
    }
UnitOfWork