*/
require_once 'DB/DataObject.php';
-class Pman_Core_DataObjects_Projects extends DB_DataObject
+class Pman_Core_DataObjects_Core_project extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
- public $__table = 'Projects'; // table name
+ public $__table = 'core_project'; // table name
public $id; // int(11) not_null primary_key auto_increment
public $name; // string(254) not_null
public $remarks; // blob(65535) not_null blob
function toEventString() {
$c = $this->client();
- return ($c->id ? $c->toEventString() : '??'). ':' . $this->name;
+ return ($c && $c->id ? $c->toEventString() : '??'). ':' . $this->name;
}
/**
}
+
+
+ function client()
+ {
+ $c = DB_DataObject::factory('core_company');
+ $c->get($this->client_id);
+ return $c;
+ }
+
+
+
+ function team()
+ {
+ $c = DB_DataObject::factory('core_group');
+ $c->get($this->team_id);
+ return $c;
+ }
+
+
+
// DEPRICATED - use userProjects
function getUserProjects($au, $data='id') // COMPANY BASED!!!!
}
- function client()
- {
- $c = DB_DataObject::factory('Companies');
- $c->get($this->client_id);
- return $c;
- }
-
/**
* check who is trying to access this. false == access denied..
*/