DataObjects/Companies.php
authorEdward <edward@roojs.com>
Wed, 22 May 2013 11:21:26 +0000 (19:21 +0800)
committerEdward <edward@roojs.com>
Wed, 22 May 2013 11:21:26 +0000 (19:21 +0800)
DataObjects/Companies.php

index 7606cbf..e218d23 100644 (file)
@@ -319,9 +319,15 @@ class Pman_Core_DataObjects_Companies extends DB_DataObject
         return $ret;
     }
     
-    function initCompanies($name, $type)
+    function initCompanies($name, $type, $roo)
     {
-        
+        $companies = DB_DataObject::factory('companies');
+        $companies->setFrom(array(
+            'name' => $name,
+            'comptype' => $type
+        ));
+        $companies->insert();
+        $companies->onInsert(array(), $roo);
     }
     
 }