protected function doLoadPendingTranslation($document, ClassMetadata $metadata, $locale)
    {
        $oid = spl_object_hash($document);

        if (!isset($this->documentTranslations[$oid][$locale])) {
            return false;
        }

        $translations = $this->documentTranslations[$oid][$locale];
        foreach ($metadata->translatableFields as $field) {
            $metadata->reflFields[$field]->setValue($document, $translations[$field]);
        }

        return true;
    }
protected function doLoadPendingTranslation($document, ClassMetadata $metadata, $locale)
    {
        $oid = spl_object_hash($document);

        if (!isset($this->documentTranslations[$oid][$locale])) {
            return false;
        }

        $translations = $this->documentTranslations[$oid][$locale];
        foreach ($metadata->translatableFields as $field) {
            $metadata->reflFields[$field]->setValue($document, $translations[$field]);
        }

        return true;
    }
protected function doLoadPendingTranslation ( $ document , ClassMetadata $ metadata , $ locale ) { $ oid = spl_object_hash ( $ document ) ; if ( ! isset ( $ this -> documentTranslations [ $ oid ] [ $ locale ] ) ) { return false ; } $ translations = $ this -> documentTranslations [ $ oid ] [ $ locale ] ; foreach ( $ metadata -> translatableFields as $ field ) { $ metadata -> reflFields [ $ field ] -> setValue ( $ document , $ translations [ $ field ] ) ; } return true ; }
Load an in-memory bound translation if there is one in the requested
locale. Does not attempt any fallback.

@param object        $document
@param ClassMetadata $metadata
@param string        $locale

@return bool whether the pending translation in language $locale was
loaded or not.

@see doLoadTranslation
Load an in - memory bound translation if there is one in the requested locale . Does not attempt any fallback .