Esempio n. 1
0
 /**
  * @param Document $document
  * @param Document $translation
  * @param $language
  */
 public function addTranslation(Document $document, Document $translation, $language = null)
 {
     $sourceId = $this->getTranslationSourceId($document);
     if (!$language) {
         $language = $translation->getProperty("language");
     }
     $this->db->insertOrUpdate("documents_translations", ["id" => $translation->getId(), "sourceId" => $sourceId, "language" => $language]);
 }