plugin/exo/Serializer/StepSerializer.php
public function serialize(Step $step, array $options = [])
    {
        $serialized = [
            'id' => $step->getUuid(),
            'parameters' => $this->serializeParameters($step),
            'picking' => $this->serializePicking($step),
            'items' => $this->serializeItems($step, $options),
        ];

        if (!empty($step->getTitle())) {
            $serialized['title'] = $step->getTitle();
        }
        if (!empty($step->getDescription())) {
            $serialized['description'] = $step->getDescription();
        }

        return $serialized;
    }
public function serialize(Step $step, array $options = [])
    {
        $serialized = [
            'id' => $step->getUuid(),
            'parameters' => $this->serializeParameters($step),
            'picking' => $this->serializePicking($step),
            'items' => $this->serializeItems($step, $options),
        ];

        if (!empty($step->getTitle())) {
            $serialized['title'] = $step->getTitle();
        }
        if (!empty($step->getDescription())) {
            $serialized['description'] = $step->getDescription();
        }

        return $serialized;
    }
public function serialize ( Step $ step , array $ options = [ ] ) { $ serialized = [ 'id' => $ step -> getUuid ( ) , 'parameters' => $ this -> serializeParameters ( $ step ) , 'picking' => $ this -> serializePicking ( $ step ) , 'items' => $ this -> serializeItems ( $ step , $ options ) , ] ; if ( ! empty ( $ step -> getTitle ( ) ) ) { $ serialized [ 'title' ] = $ step -> getTitle ( ) ; } if ( ! empty ( $ step -> getDescription ( ) ) ) { $ serialized [ 'description' ] = $ step -> getDescription ( ) ; } return $ serialized ; }
Converts a Step into a JSON-encodable structure.

@param Step  $step
@param array $options

@return array
Converts a Step into a JSON - encodable structure .