/**
  * Writes the object data.
  * @return void.
  */
 function write()
 {
     parent::write();
     // First get all translation entries, ...
     $trans =& $this->obj->getTranslations();
     // .. then delete old translation entries, ...
     $this->obj->removeTranslations();
     // ...and finally write new translations to object_translation
     for ($i = 0; $i < count($trans["Fobject"]); $i++) {
         // first entry is always the default language
         $default = $i == 0 ? 1 : 0;
         $val = $trans["Fobject"][$i];
         $this->obj->addTranslation($this->obj->getTitle(), $val["desc"], $val["lang"], $default);
     }
 }
Ejemplo n.º 2
0
 /**
  * Writes the object data.
  * @return void.
  */
 function write()
 {
     $this->isNewFile = $this->obj->getVersion() == 0;
     if ($this->isNewFile) {
         $this->obj->setVersion(1);
     }
     parent::write();
     /*
     ilHistory::_createEntry($this->getObjectId(), 'update', '', '','', true);
     */
 }