Documentation is available at basic_model_create.php
1 <?php
2 /**
3 * @author Jan H. Andersen <jha@ipwsystems.dk>
4 * @author Martin R. Larsen <mrl@ipwsystems.dk>
5 * @copyright {@link http://www.ipwsystems.dk/ IPW Systems a.s}
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7 * @package METAjour
8 * @subpackage model
9 * $Id: basic_model_create.php,v 1.9 2005/01/16 23:07:51 jan Exp $
10 */
11
12 require_once('basic_model.php');
13
14 class basic_model_create extends basic_model {
15 var $_obj;
16
17 function model() {
18 $this->_obj = owNew($this->otype);
19
20 if ($this->parentid) {
21 $this->_obj->createObject($this->data,$this->parentid);
22 } else {
23 $this->_obj->createObject($this->data,0);
24 }
25
26 $this->userhandler->setObjectIdStack($this->_obj->getObjectId());
27
28 if ($this->otype == 'document') {
29 $sectionobj = owNew('documentsection');
30 $sectionobj->createObject(array("name" => ""),$this->_obj->getObjectId());
31 }
32
33 if (isset($this->data['__categories__'])) {
34 $this->_obj->setCategory($this->data['__categories__']);
35 }
36
37 if (isset($this->data['__webaccess__']) || isset($this->data['__sysaccess__'])) {
38 $this->_obj->setAccess($this->data['__webaccess__'],$this->data['__sysaccess__']);
39 }
40
41 $extra = owDatatypeExtraCols($this->otype);
42 if (!empty($extra)) {
43 $arr = packData($extra, $this->data);
44 $this->_obj->setExtraData($arr);
45 }
46 }
47 }
48
49 ?>
Documentation generated on Thu, 9 Jun 2005 06:51:08 +0200 by phpDocumentor 1.2.3