setType("DragTesting"); $this->setName("Drag Testing"); $this->setActions(array("view"=>_("View"), "edit"=>_("Edit"))); if ($id) { $data = $this->load($id); } } function create() { if ($id = parent::create()) { return $id; } return false; } function save() { if (parent::save()) { return $this->getId(); } return false; } function copy($locked=false) { $copy = $this->create(); if ($copy) { if ($locked) { $lock = $this->lock($copy); } return $copy; } } function build($data) { if (parent::build($data)) { if ($this->getId() > 0) { return $this->save(); } else { return $this->create(); } } return false; } function delete() { if (is_admin() || $this->creator==get_logged_in_user()->getId()) { if (parent::delete()) { return true; } } return false; } function buildFromXML($obj, $folder=0, $dir, $version=1) { parent::buildFromXML($obj, $folder, $dir); return $this->create(); } function getObjectsXML() { return ""; } } ?>