public function saveStep(FormInterface $form)
    {
        $answers = $this->getUserConfiguration()->getAnswers();
        $data = $form->getData();
        $answersData = $form->get('answers')->getData();

        if (is_null($answersData)) {
            $answersData = array();
        } else if (!is_array($answersData)) {
            $answersData = array($answersData);
        }

        $answers[$this->getCurrentQuestion()] = array_merge($answersData, $data);
        $this->getUserConfiguration()->setAnswers($answers);
        $this->updateSessionConfiguration();

        return $this;
    }
public function saveStep(FormInterface $form)
    {
        $answers = $this->getUserConfiguration()->getAnswers();
        $data = $form->getData();
        $answersData = $form->get('answers')->getData();

        if (is_null($answersData)) {
            $answersData = array();
        } else if (!is_array($answersData)) {
            $answersData = array($answersData);
        }

        $answers[$this->getCurrentQuestion()] = array_merge($answersData, $data);
        $this->getUserConfiguration()->setAnswers($answers);
        $this->updateSessionConfiguration();

        return $this;
    }
public function saveStep ( FormInterface $ form ) { $ answers = $ this -> getUserConfiguration ( ) -> getAnswers ( ) ; $ data = $ form -> getData ( ) ; $ answersData = $ form -> get ( 'answers' ) -> getData ( ) ; if ( is_null ( $ answersData ) ) { $ answersData = array ( ) ; } else if ( ! is_array ( $ answersData ) ) { $ answersData = array ( $ answersData ) ; } $ answers [ $ this -> getCurrentQuestion ( ) ] = array_merge ( $ answersData , $ data ) ; $ this -> getUserConfiguration ( ) -> setAnswers ( $ answers ) ; $ this -> updateSessionConfiguration ( ) ; return $ this ; }
Save current questionnaire step

@param FormInterface $form

@return $this
Save current questionnaire step