public function createOrderLinesByCartLines(
        OrderInterface $order,
        Collection $cartLines
    ) {
        $orderLines = new ArrayCollection();

        /**
         * @var CartLineInterface $cartLine
         */
        foreach ($cartLines as $cartLine) {
            $orderLine = $this
                ->createOrderLineByCartLine(
                    $order,
                    $cartLine
                );

            $cartLine->setOrderLine($orderLine);
            $orderLines->add($orderLine);
        }

        return $orderLines;
    }
public function createOrderLinesByCartLines(
        OrderInterface $order,
        Collection $cartLines
    ) {
        $orderLines = new ArrayCollection();

        /**
         * @var CartLineInterface $cartLine
         */
        foreach ($cartLines as $cartLine) {
            $orderLine = $this
                ->createOrderLineByCartLine(
                    $order,
                    $cartLine
                );

            $cartLine->setOrderLine($orderLine);
            $orderLines->add($orderLine);
        }

        return $orderLines;
    }
public function createOrderLinesByCartLines ( OrderInterface $ order , Collection $ cartLines ) { $ orderLines = new ArrayCollection ( ) ; /**
         * @var CartLineInterface $cartLine
         */ foreach ( $ cartLines as $ cartLine ) { $ orderLine = $ this -> createOrderLineByCartLine ( $ order , $ cartLine ) ; $ cartLine -> setOrderLine ( $ orderLine ) ; $ orderLines -> add ( $ orderLine ) ; } return $ orderLines ; }
Given a set of CartLines, return a set of OrderLines.

@param OrderInterface $order     Order
@param Collection     $cartLines Set of CartLines

@return Collection Set of OrderLines
Given a set of CartLines return a set of OrderLines .