plugin/exo/Serializer/ExerciseSerializer.php
public function deserialize($data, Exercise $exercise = null, array $options = [])
    {
        $exercise = $exercise ?: new Exercise();

        $this->sipe('id', 'setUuid', $data, $exercise);
        $this->sipe('description', 'setDescription', $data, $exercise);

        if (in_array(Transfer::REFRESH_UUID, $options)) {
            $exercise->refreshUuid();
        }

        if (!empty($data['parameters'])) {
            $this->deserializeParameters($exercise, $data['parameters']);
        }

        if (!empty($data['picking'])) {
            $this->deserializePicking($exercise, $data['picking']);
        }

        if (!empty($data['steps'])) {
            $this->deserializeSteps($exercise, $data['steps'], $options);
        }

        return $exercise;
    }
public function deserialize($data, Exercise $exercise = null, array $options = [])
    {
        $exercise = $exercise ?: new Exercise();

        $this->sipe('id', 'setUuid', $data, $exercise);
        $this->sipe('description', 'setDescription', $data, $exercise);

        if (in_array(Transfer::REFRESH_UUID, $options)) {
            $exercise->refreshUuid();
        }

        if (!empty($data['parameters'])) {
            $this->deserializeParameters($exercise, $data['parameters']);
        }

        if (!empty($data['picking'])) {
            $this->deserializePicking($exercise, $data['picking']);
        }

        if (!empty($data['steps'])) {
            $this->deserializeSteps($exercise, $data['steps'], $options);
        }

        return $exercise;
    }
public function deserialize ( $ data , Exercise $ exercise = null , array $ options = [ ] ) { $ exercise = $ exercise ? : new Exercise ( ) ; $ this -> sipe ( 'id' , 'setUuid' , $ data , $ exercise ) ; $ this -> sipe ( 'description' , 'setDescription' , $ data , $ exercise ) ; if ( in_array ( Transfer :: REFRESH_UUID , $ options ) ) { $ exercise -> refreshUuid ( ) ; } if ( ! empty ( $ data [ 'parameters' ] ) ) { $ this -> deserializeParameters ( $ exercise , $ data [ 'parameters' ] ) ; } if ( ! empty ( $ data [ 'picking' ] ) ) { $ this -> deserializePicking ( $ exercise , $ data [ 'picking' ] ) ; } if ( ! empty ( $ data [ 'steps' ] ) ) { $ this -> deserializeSteps ( $ exercise , $ data [ 'steps' ] , $ options ) ; } return $ exercise ; }
Converts raw data into an Exercise entity.

@param array    $data
@param Exercise $exercise
@param array    $options

@return Exercise
Converts raw data into an Exercise entity .