2009-01-12 21:13:18 -08:00
|
|
|
<?php
|
2011-06-27 23:56:13 -07:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
class Status extends AppModel {
|
|
|
|
|
|
2011-06-27 23:56:13 -07:00
|
|
|
var $name = 'Status';
|
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
|
|
|
var $hasMany = array(
|
|
|
|
|
'Enquiry' => array('className' => 'Enquiry',
|
|
|
|
|
'foreignKey' => 'status_id',
|
|
|
|
|
'dependent' => false,
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => '',
|
|
|
|
|
'limit' => '',
|
|
|
|
|
'offset' => '',
|
|
|
|
|
'exclusive' => '',
|
|
|
|
|
'finderQuery' => '',
|
|
|
|
|
'counterQuery' => ''
|
|
|
|
|
)
|
|
|
|
|
);
|
2009-01-12 21:13:18 -08:00
|
|
|
|
|
|
|
|
|
2011-06-27 23:56:13 -07:00
|
|
|
function getJSON() {
|
|
|
|
|
$statuses = $this->find('list', array('fields'=>array('Status.name')));
|
|
|
|
|
return json_encode($statuses);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getClassNamesJSON() {
|
|
|
|
|
$statuses = $this->find('list', array('fields'=>array('Status.class')));
|
|
|
|
|
return json_encode($statuses);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
}
|
2011-06-27 23:56:13 -07:00
|
|
|
|
2009-01-12 21:13:18 -08:00
|
|
|
?>
|