public function load($parameters, $prepare = true) {
        $this->parameters = $parameters;

        if($prepare) {
            $this->prepareSession();
        }

        if (isset($parameters['bootbuilder-form']) && isset($_SESSION['bbforms']) && isset($_SESSION['bbforms'][$parameters['bootbuilder-form']])) {
            $this->form = $this->loadForm($parameters['bootbuilder-form']);
            
            if ($this->form instanceof \bootbuilder\Form) {
                $this->form->parseParameters($parameters);
            }
        }else{
            $this->form = new \bootbuilder\NormalForm();
        }

        return $this;
    }
public function load($parameters, $prepare = true) {
        $this->parameters = $parameters;

        if($prepare) {
            $this->prepareSession();
        }

        if (isset($parameters['bootbuilder-form']) && isset($_SESSION['bbforms']) && isset($_SESSION['bbforms'][$parameters['bootbuilder-form']])) {
            $this->form = $this->loadForm($parameters['bootbuilder-form']);
            
            if ($this->form instanceof \bootbuilder\Form) {
                $this->form->parseParameters($parameters);
            }
        }else{
            $this->form = new \bootbuilder\NormalForm();
        }

        return $this;
    }
public function load ( $ parameters , $ prepare = true ) { $ this -> parameters = $ parameters ; if ( $ prepare ) { $ this -> prepareSession ( ) ; } if ( isset ( $ parameters [ 'bootbuilder-form' ] ) && isset ( $ _SESSION [ 'bbforms' ] ) && isset ( $ _SESSION [ 'bbforms' ] [ $ parameters [ 'bootbuilder-form' ] ] ) ) { $ this -> form = $ this -> loadForm ( $ parameters [ 'bootbuilder-form' ] ) ; if ( $ this -> form instanceof \ bootbuilder \ Form ) { $ this -> form -> parseParameters ( $ parameters ) ; } } else { $ this -> form = new \ bootbuilder \ NormalForm ( ) ; } return $ this ; }
Load previous form from session
@param array $parameters POST/GET parameters array
@param boolean $prepare Prepare session, false on unittesting
@return \bootbuilder\Validation\Validator
Load previous form from session