Bridge/Symfony/Serializer/Normalizer/SupplierOrderNormalizer.php
public function normalize($order, $format = null, array $context = [])
    {
        $data = parent::normalize($order, $format, $context);

        if ($this->contextHasGroup('Summary', $context)) {
            $items = [];
            foreach ($order->getItems() as $item) {
                $items[] = $this->normalizeObject($item, $format, $context);
            }

            $data = array_replace($data, [
                'items'       => $items,
                'description' => $order->getDescription(),
            ]);
        }

        return $data;
    }
public function normalize($order, $format = null, array $context = [])
    {
        $data = parent::normalize($order, $format, $context);

        if ($this->contextHasGroup('Summary', $context)) {
            $items = [];
            foreach ($order->getItems() as $item) {
                $items[] = $this->normalizeObject($item, $format, $context);
            }

            $data = array_replace($data, [
                'items'       => $items,
                'description' => $order->getDescription(),
            ]);
        }

        return $data;
    }
public function normalize ( $ order , $ format = null , array $ context = [ ] ) { $ data = parent :: normalize ( $ order , $ format , $ context ) ; if ( $ this -> contextHasGroup ( 'Summary' , $ context ) ) { $ items = [ ] ; foreach ( $ order -> getItems ( ) as $ item ) { $ items [ ] = $ this -> normalizeObject ( $ item , $ format , $ context ) ; } $ data = array_replace ( $ data , [ 'items' => $ items , 'description' => $ order -> getDescription ( ) , ] ) ; } return $ data ; }
@inheritdoc

@param SupplierOrderInterface $order
@inheritdoc