Supplier/Export/SupplierOrderExporter.php
protected function buildRow(SupplierOrderInterface $order)
    {
        $date = null;
        $term = null;

        $formatter = $this->getFormatter();

        if (null !== $orderedAt = $order->getOrderedAt()) {
            $orderedAt = $formatter->date($orderedAt);
        }
        if (null !== $completedAt = $order->getCompletedAt()) {
            $completedAt = $formatter->date($completedAt);
        }
        if (null !== $paymentDate = $order->getPaymentDate()) {
            $paymentDate = $formatter->date($paymentDate);
        }
        if (null !== $paymentDueDate = $order->getPaymentDueDate()) {
            $paymentDueDate = $formatter->date($paymentDueDate);
        }
        if (null !== $carrier = $order->getCarrier()) {
            $carrier = $carrier->getName();
        }
        if (null !== $forwarderDate = $order->getForwarderDate()) {
            $forwarderDate = $formatter->date($forwarderDate);
        }
        if (null !== $forwarderDueDate = $order->getForwarderDueDate()) {
            $forwarderDueDate = $formatter->date($forwarderDueDate);
        }

        return [
            'id'                 => $order->getId(),
            'number'             => $order->getNumber(),
            'state'              => $order->getState(),
            'ordered_at'         => $orderedAt,
            'completed_at'       => $completedAt,
            'supplier'           => $order->getSupplier()->getName(),
            'payment_total'      => $order->getPaymentTotal(),
            'payment_date'       => $paymentDate,
            'payment_due_date'   => $paymentDueDate,
            'carrier'            => $carrier,
            'forwarder_total'    => $order->getForwarderTotal(),
            'forwarder_date'     => $forwarderDate,
            'forwarder_due_date' => $forwarderDueDate,
        ];
    }
protected function buildRow(SupplierOrderInterface $order)
    {
        $date = null;
        $term = null;

        $formatter = $this->getFormatter();

        if (null !== $orderedAt = $order->getOrderedAt()) {
            $orderedAt = $formatter->date($orderedAt);
        }
        if (null !== $completedAt = $order->getCompletedAt()) {
            $completedAt = $formatter->date($completedAt);
        }
        if (null !== $paymentDate = $order->getPaymentDate()) {
            $paymentDate = $formatter->date($paymentDate);
        }
        if (null !== $paymentDueDate = $order->getPaymentDueDate()) {
            $paymentDueDate = $formatter->date($paymentDueDate);
        }
        if (null !== $carrier = $order->getCarrier()) {
            $carrier = $carrier->getName();
        }
        if (null !== $forwarderDate = $order->getForwarderDate()) {
            $forwarderDate = $formatter->date($forwarderDate);
        }
        if (null !== $forwarderDueDate = $order->getForwarderDueDate()) {
            $forwarderDueDate = $formatter->date($forwarderDueDate);
        }

        return [
            'id'                 => $order->getId(),
            'number'             => $order->getNumber(),
            'state'              => $order->getState(),
            'ordered_at'         => $orderedAt,
            'completed_at'       => $completedAt,
            'supplier'           => $order->getSupplier()->getName(),
            'payment_total'      => $order->getPaymentTotal(),
            'payment_date'       => $paymentDate,
            'payment_due_date'   => $paymentDueDate,
            'carrier'            => $carrier,
            'forwarder_total'    => $order->getForwarderTotal(),
            'forwarder_date'     => $forwarderDate,
            'forwarder_due_date' => $forwarderDueDate,
        ];
    }
protected function buildRow ( SupplierOrderInterface $ order ) { $ date = null ; $ term = null ; $ formatter = $ this -> getFormatter ( ) ; if ( null !== $ orderedAt = $ order -> getOrderedAt ( ) ) { $ orderedAt = $ formatter -> date ( $ orderedAt ) ; } if ( null !== $ completedAt = $ order -> getCompletedAt ( ) ) { $ completedAt = $ formatter -> date ( $ completedAt ) ; } if ( null !== $ paymentDate = $ order -> getPaymentDate ( ) ) { $ paymentDate = $ formatter -> date ( $ paymentDate ) ; } if ( null !== $ paymentDueDate = $ order -> getPaymentDueDate ( ) ) { $ paymentDueDate = $ formatter -> date ( $ paymentDueDate ) ; } if ( null !== $ carrier = $ order -> getCarrier ( ) ) { $ carrier = $ carrier -> getName ( ) ; } if ( null !== $ forwarderDate = $ order -> getForwarderDate ( ) ) { $ forwarderDate = $ formatter -> date ( $ forwarderDate ) ; } if ( null !== $ forwarderDueDate = $ order -> getForwarderDueDate ( ) ) { $ forwarderDueDate = $ formatter -> date ( $ forwarderDueDate ) ; } return [ 'id' => $ order -> getId ( ) , 'number' => $ order -> getNumber ( ) , 'state' => $ order -> getState ( ) , 'ordered_at' => $ orderedAt , 'completed_at' => $ completedAt , 'supplier' => $ order -> getSupplier ( ) -> getName ( ) , 'payment_total' => $ order -> getPaymentTotal ( ) , 'payment_date' => $ paymentDate , 'payment_due_date' => $ paymentDueDate , 'carrier' => $ carrier , 'forwarder_total' => $ order -> getForwarderTotal ( ) , 'forwarder_date' => $ forwarderDate , 'forwarder_due_date' => $ forwarderDueDate , ] ; }
Builds the order row.

@param SupplierOrderInterface $order

@return array
Builds the order row .