当前位置: 首页>>代码示例>>PHP>>正文


PHP Messages::addComplaint方法代码示例

本文整理汇总了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());
         }
     }
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:25,代码来源:ContactusController.php

示例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());
         }
     }
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:22,代码来源:ComplaintsController.php


注:本文中的Messages::addComplaint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。