plugin/exo/Serializer/Item/Type/ChoiceQuestionSerializer.php
public function deserialize($data, ChoiceQuestion $choiceQuestion = null, array $options = [])
    {
        if (empty($choiceQuestion)) {
            $choiceQuestion = new ChoiceQuestion();
        }

        $this->sipe('multiple', 'setMultiple', $data, $choiceQuestion);
        $this->sipe('random', 'setShuffle', $data, $choiceQuestion);
        $this->sipe('numbering', 'setNumbering', $data, $choiceQuestion);

        $this->deserializeChoices($choiceQuestion, $data['choices'], $data['solutions'], $options);

        return $choiceQuestion;
    }
public function deserialize($data, ChoiceQuestion $choiceQuestion = null, array $options = [])
    {
        if (empty($choiceQuestion)) {
            $choiceQuestion = new ChoiceQuestion();
        }

        $this->sipe('multiple', 'setMultiple', $data, $choiceQuestion);
        $this->sipe('random', 'setShuffle', $data, $choiceQuestion);
        $this->sipe('numbering', 'setNumbering', $data, $choiceQuestion);

        $this->deserializeChoices($choiceQuestion, $data['choices'], $data['solutions'], $options);

        return $choiceQuestion;
    }
public function deserialize ( $ data , ChoiceQuestion $ choiceQuestion = null , array $ options = [ ] ) { if ( empty ( $ choiceQuestion ) ) { $ choiceQuestion = new ChoiceQuestion ( ) ; } $ this -> sipe ( 'multiple' , 'setMultiple' , $ data , $ choiceQuestion ) ; $ this -> sipe ( 'random' , 'setShuffle' , $ data , $ choiceQuestion ) ; $ this -> sipe ( 'numbering' , 'setNumbering' , $ data , $ choiceQuestion ) ; $ this -> deserializeChoices ( $ choiceQuestion , $ data [ 'choices' ] , $ data [ 'solutions' ] , $ options ) ; return $ choiceQuestion ; }
Converts raw data into a Choice question entity.

@param array          $data
@param ChoiceQuestion $choiceQuestion
@param array          $options

@return ChoiceQuestion
Converts raw data into a Choice question entity .