Newer
Older
static function create($ht) {
if (!isset($ht['mode']))
$ht['mode'] = 1;
$ht['created'] = new SqlFunction('NOW');
return parent::create($ht);
}
static function lookup($var, $list= false) {
if (!($item = parent::lookup($var)))
return null;
$item->_list = $list;
return $item;
}
static function __create($ht, &$error=false) {
global $ost;
$properties = JsonDataEncoder::encode($ht['properties']);
unset($ht['properties']);
if ($status = TicketStatus::create($ht)) {
$status->save(true);
$status->_config = new Config('TS.'.$status->getId());
$status->_config->set('properties', $properties);
}
return $status;
}
static function options() {
include(STAFFINC_DIR . 'templates/status-options.tmpl.php');
}
}