Backend\Core\Engine\Form::parse PHP Method

parse() public method

Parse the form
public parse ( TwigTemplate $tpl )
$tpl TwigTemplate The template instance wherein the form will be parsed.
    public function parse($tpl)
    {
        parent::parse($tpl);
        $this->validate();
        // if the form is submitted but there was an error, assign a general error
        if ($this->useGlobalError && $this->isSubmitted() && !$this->isCorrect()) {
            $tpl->assign('formError', true);
        }
    }

Usage Example

Example #1
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     if ($this->frm) {
         $this->frm->parse($this->tpl);
     }
 }
All Usage Examples Of Backend\Core\Engine\Form::parse