Currently I'm trying to build a web application in Zend framework.
But I can't figure out how to Manage status in my system
Eg I have the following status for my quote handling in the system
Awaiting for Confirmation
Asssigned
In Progress
Completed
Mark As Spam
I stored these values in a table called ProviderQuoteStatus and I created a function called ProviderQuoteStatus() in the zend_db class and uses the function to generate status values in zend form dropdown box.
$select = $this->select()->from("providerQuoteStatus",
array('key' => 'providerQuoteStatusId',
'value' => 'providerQuoteStatusName'));
$result = $this->fetchAll($select);
return $result->toArray();
Here is my Zend form code
$serviceType = new Application_Model_DbTable_ProviderQuoteStatus();
$serviceTypeValues = $serviceType->getProviderQuoteStatusFormValues();
$dropDownElement = new Zend_Form_Element_Select('providerQuoteStatus');
$dropDownElement->addMultiOptions($serviceTypeValues);
Everything working fine till this stage. If the quote in Asssigned Stage I only wanted the provider select these following options
Asssigned
In Progress
Completed
How can I remove 'Awaiting for Confirmation' and 'Mark As Spam' values in the Zend form dropdown box ?
Also where should I stored all these business logic (For example if the quote in Assigned Stage only can have Assigned, In Progress options etc)? In the Model DB class?
Thanks so much in advance :D