/**
  * 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);
     }
 }
Beispiel #2
0
 /**
  * Converts a DAV path into an array of DAV objects.
  *
  * @param  String davPath A DAV path expression.
  * @return array<ilObjectDAV> object or null, if the path does not denote an object.
  */
 private function toObjectPath($davPath)
 {
     $this->writelog('toObjectPath(' . $davPath);
     global $tree;
     $nodePath = $this->toNodePath($davPath);
     if (is_null($nodePath)) {
         return null;
     } else {
         $objectPath = array();
         foreach ($nodePath as $node) {
             $pathElement = ilObjectDAV::createObject($node['child'], $node['type']);
             if (is_null($pathElement)) {
                 break;
             }
             $objectPath[] = $pathElement;
         }
         return $objectPath;
     }
 }
 /**
  * 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);
     */
 }