src/FormHandler.php
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;
    }
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;
    }
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 ; }
Assign the form data to the view

@return FormViewInterface
Assign the form data to the view