cmc-sales/models/status.php

36 lines
920 B
PHP
Raw Normal View History

<?php
class Status extends AppModel {
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' => ''
)
);
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);
}
}
?>