Of course it does require a view script in
views/scripts/edit/index.phtml which we can see rendered in figure 9.3.
Licensed to Menshu You
Zend Framework in Action (Ch010) Manning Publications Co. 8
Figure 9.3 The support tracker submission form used to send bug or feature requests to the development team.
Having done that we can then move on to the fourth requirement which is to notify support team members
when support tickets are added and updated. Conveniently, this also brings us back on to the topic of this
chapter; email.
9.3.2 Integrating Zend_Mail into the application
You??™ll probably have noticed that there is no mail functionality in our SupportController and all createAction
()does is filter the input and create the database row. Rather than add unnecessary bulk to the controller action
method it makes more sense to attach the email notification to the save() process which is ultimately handled
by Zend_Db_Table_Row::save(). Since Zend_Db_Table_Row::save() can be used for updating existing rows
as well as creating new ones it is a good point to trigger the mail to the support team members.
Another thing you may have noticed was the line in our Support Zend_Db_Table subclass that set the row
class to use:
protected $_rowClass = 'SupportTicket??™;
In listing 9.
Pages:
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257