DataObjects/Office.php
authorAlan Knowles <alan@roojs.com>
Thu, 31 Jan 2013 09:36:18 +0000 (17:36 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 31 Jan 2013 09:36:18 +0000 (17:36 +0800)
DataObjects/Office.php

index eb27322..b6e3686 100644 (file)
@@ -41,5 +41,13 @@ class Pman_Core_DataObjects_Office extends DB_DataObject
     function checkPerm($lvl, $au) 
     {
         return $au->hasPerm("Core.Offices", $lvl);    
-    } 
+    }
+    
+    function company()
+    {
+        $c = DB_DataObject::Factory('Companies');
+        $c->get($this->company_id);
+        return $c;
+        
+    }
 }
\ No newline at end of file