Exemple #1
0
 /**
  * Assign the form data to the view
  *
  * @return FormViewInterface
  */
 public function createView()
 {
     if (!$this->formView) {
         $this->formView = new FormView();
     }
     $this->formView->setFormBlueprint($this->form);
     $this->formView->setFields($this->getProcessedFields());
     $this->formView->setSections($this->form->getSections());
     $this->formView->setMethod($this->getMethod());
     $this->formView->setName($this->getName());
     $this->formView->setEncoding($this->getEncoding());
     $this->formView->setAction($this->getAction());
     $this->formView->setSubmitted($this->isSubmitted());
     $this->formView->setValid($this->isValid());
     $this->formView->setErrors($this->getValidationErrors());
     $this->formView->setShouldShowSuccessMessage($this->shouldShowSuccessMessage());
     $this->formView->setSubmitButtonLabel($this->form->getSubmitButtonLabel());
     if (isset($this->restoreDataHandler)) {
         $this->restoreDataHandler->cancelRestore($this);
     }
     return $this->formView;
 }
Exemple #2
0
 public function getSuccessMessage()
 {
     return $this->formBlueprint->getSuccessMessage();
 }