Admin_Form_Ban::getSubmit PHP Method

getSubmit() public method

Getter for the submit button
public getSubmit ( ) : Zend_Form_Element_Submit
return Zend_Form_Element_Submit
    public function getSubmit()
    {
        return $this->submit;
    }

Usage Example

 /**
  * Method for saving a banned
  *
  * @param ZendForm $p_form
  * @param Newscoop\Entity\Comment\Commenter $p_commenter
  */
 private function handleBanForm(Admin_Form_Ban $p_form, $p_commenter, $p_publication)
 {
     if ($this->getRequest()->isPost() && $p_form->isValid($_POST)) {
         if ($p_form->getSubmit()->isChecked()) {
             $values = $p_form->getValues();
             $this->acceptanceRepository->saveBanned($p_commenter, $p_publication, $values);
             $this->acceptanceRepository->flush();
             $this->_helper->flashMessenger(getGS('Ban for commenter "$1" saved.', $p_commenter->getName()));
             if ($p_form->getDeleteComments()->isChecked()) {
                 $this->commenterRepository->delete($p_commenter, $p_form->getValues());
                 $this->commenterRepository->flush();
             }
         }
         $this->_helper->redirector->gotoSimple('index', 'comment');
     }
 }
All Usage Examples Of Admin_Form_Ban::getSubmit