/** * Attention only use this for objects who have not yet been created (use like: $x = new ilObjDataCollection; $x->cloneStructure($id)) * @param $original_id The original ID of the dataselection you want to clone it's structure * @return void */ public function cloneStructure($original_id) { $original = new ilObjBibliographic($original_id); $this->moveFile($original->getFileAbsolutePath()); $this->setOnline($original->getOnline()); $this->setDescription($original->getDescription()); $this->setTitle($original->getTitle()); $this->setType($original->getType()); $this->doUpdate(); $this->writeSourcefileEntriesToDb(); }
/** * Build data array, data is read from cache except bibl object itself * * @param string $a_entity * @param array $a_ids */ protected function _readData($a_entity, $a_ids) { switch ($a_entity) { case 'bibl': foreach ($a_ids as $bibl_id) { if (ilObject::_lookupType($bibl_id) == 'bibl') { $obj = new ilObjBibliographic($bibl_id); $data = array('id' => $bibl_id, 'title' => $obj->getTitle(), 'description' => $obj->getDescription(), 'fileName' => $obj->getFilename(), 'is_online' => $obj->getOnline()); $this->data[] = $data; } } break; default: } }