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

        if (!empty($data['penalty']) || 0 === $data['penalty']) {
            $question->setPenalty($data['penalty']);
        }

        $this->sipe('direction', 'setDirection', $data, $question);
        $this->sipe('mode', 'setMode', $data, $question);

        $this->deserializeItems($question, $data['items'], $data['solutions'], $options);

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

        if (!empty($data['penalty']) || 0 === $data['penalty']) {
            $question->setPenalty($data['penalty']);
        }

        $this->sipe('direction', 'setDirection', $data, $question);
        $this->sipe('mode', 'setMode', $data, $question);

        $this->deserializeItems($question, $data['items'], $data['solutions'], $options);

        return $question;
    }
public function deserialize ( $ data , OrderingQuestion $ question = null , array $ options = [ ] ) { if ( empty ( $ question ) ) { $ question = new OrderingQuestion ( ) ; } if ( ! empty ( $ data [ 'penalty' ] ) || 0 === $ data [ 'penalty' ] ) { $ question -> setPenalty ( $ data [ 'penalty' ] ) ; } $ this -> sipe ( 'direction' , 'setDirection' , $ data , $ question ) ; $ this -> sipe ( 'mode' , 'setMode' , $ data , $ question ) ; $ this -> deserializeItems ( $ question , $ data [ 'items' ] , $ data [ 'solutions' ] , $ options ) ; return $ question ; }
Converts raw data into an Ordering question entity.

@param array            $data
@param OrderingQuestion $question
@param array            $options

@return OrderingQuestion
Converts raw data into an Ordering question entity .