Newer
Older
<?php
/*********************************************************************
class.priority.php
Priority handle
Peter Rotich <peter@osticket.com>
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
class Priority extends VerySimpleModel
implements TemplateVariable {
static $meta = array(
'table' => PRIORITY_TABLE,
'pk' => array('priority_id'),
'ordering' => array('-priority_urgency')
);
// TemplateVariable interface
function asVar() { return $this->getDesc(); }
static function getVarScope() {
return array(
'desc' => __('Priority Level'),
function __toString() {
return $this->getDesc();
}
static function getPriorities( $publicOnly=false) {
$objects = static::objects()->values_flat('priority_id', 'priority_desc');
if ($publicOnly)
$objects->filter(array('ispublic'=>1));
foreach ($objects as $row) {