本文整理汇总了PHP中Messages::addComplaint方法的典型用法代码示例。如果您正苦于以下问题:PHP Messages::addComplaint方法的具体用法?PHP Messages::addComplaint怎么用?PHP Messages::addComplaint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages::addComplaint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
/** The action that allows people to send in requests via the contact us
* form
* @access public
* @return void
*/
public function indexAction()
{
$form = new ContactUsForm();
$form->removeElement('captcha');
$this->view->form = $form;
if ($this->getRequest()->isPost()) {
if ($form->isValid($this->_request->getPost())) {
$messages = new Messages();
$messages->addComplaint($form->getValues());
$cc = array();
$cc[] = array('email' => $form->getvalue('comment_author_email'), 'name' => $form->getValue('comment_author'));
$this->_helper->mailer($form->getValues(), 'contactUs', null, $cc, $cc);
$this->getFlash()->addMessage('Your enquiry has been submitted to the Scheme');
$this->redirect('about/contactus/');
} else {
$this->getFlash()->addMessage('There are problems with your submission');
$form->populate($form->getValues());
}
}
}
示例2: indexAction
/** Submit complaints action
*/
public function indexAction()
{
$form = new ComplaintsForm();
$this->view->form = $form;
if ($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())) {
if ($form->isValid($form->getValues())) {
$insertData = $form->getValues();
$cc = array();
$cc[] = array('email' => $form->getvalue('comment_author_email'), 'name' => $form->getValue('comment_author'));
$this->_helper->mailer($insertData, 'complaint', null, $cc, $cc);
$messages = new Messages();
$insert = $messages->addComplaint($insertData);
$this->_flashMessenger->addMessage('Your complaint has been submitted');
$this->_redirect('getinvolved/complaints/');
} else {
$this->_flashMessenger->addMessage('There are problems with your submission');
$form->populate($form->getValues());
}
}
}