This method copies properties from $orderLine onto this order line.

@param OrderLineInterface $orderLine
323446
public function copyProperties(OrderLineInterface $orderLine): void
    {
        $this->setExternalId($orderLine->getExternalId());
        $this->setFileUrl($orderLine->getFileUrl());
        $this->setProductNumber($orderLine->getProductNumber());
        $this->setProductName($orderLine->getProductName());
        $this->setQuantity($orderLine->getQuantity());
        $this->setUnitPrice($orderLine->getUnitPrice());
        $this->setTotalPrice($orderLine->getTotalPrice());
        $this->setVatPct($orderLine->getVatPct());
        $this->setVariant($orderLine->getVariant());
        $this->setXmlParams($orderLine->getXmlParams());
        $this->setOrder($orderLine->getOrder());
        $this->setProduct($orderLine->getProduct());
    }
442107
public function delete($orderId = null)
    {
        if (empty($orderId)) {
            $orderId = $this->getOrderId();
        }
        
        /** @var QueueHandler $handler */
        $handler = $this->requestHandler();
        return $handler->delete($orderId);
    }
1159253
private function processLine(string $line): void
    {
        $iterator = new \ArrayIterator(explode(Tokens::SPACE, $line));

        if ($this->isControlEntry($iterator)) {
            $this->processControlEntry($iterator);

            return;
        }

        $resourceRecord = new ResourceRecord();

        $this->processResourceName($iterator, $resourceRecord);
        $this->processTtl($iterator, $resourceRecord);
        $this->processClass($iterator, $resourceRecord);
        $resourceRecord->setRdata($this->extractRdata($iterator));

        $this->zone->addResourceRecord($resourceRecord);
    }
1313657
public function setOrderId($orderId)
    {
        if (!is_int($orderId)) {
            throw new InvalidArgumentException(
                sprintf('OrderId must be an integer, "%s" given.', print_r($orderId, true))
            );
        }

        $this->orderId = $orderId;

        return $this;
    }
870473
private function setOrderType($data, ApiOrderInterface $order, $patch = false)
    {
        // get OrderType
        $type = $this->getProperty($data, 'type', $order->getType());
        // set order type
        if (isset($data['type'])) {
            if (is_array($type) && isset($type['id'])) {
                // if provided as array
                $typeId = $type['id'];
            } elseif (is_numeric($type)) {
                // if is numeric
                $typeId = $type;
            } else {
                throw new OrderException('No typeid given');
            }
        } elseif (!$patch) {
            // default type is manual
            $typeId = OrderType::MANUAL;
        } else {
            // keep current type
            return;
        }

        // get entity
        $orderType = $this->getOrderTypeEntityById($typeId);
        if (!$orderType) {
            throw new EntityNotFoundException(static::$orderTypeEntityName, $typeId);
        }

        // set order type
        $order->setType($orderType);
    }
1156577
public function setOrderable($orderable)
    {
        if ($orderable === 'true') {
            $this->orderable = true;

            return $this;
        }
        $this->orderable = false;

        return $this;
    }
318162
private function getCurrentShippingMethodCostsCollection(OrderInterface $order) : Collection
    {
        return $this->methodProvider->getShippingMethodCosts($order->getShippingMethod(), new OrderContext($order));
    }
1349083
public function transformIntoBasket(OrderInterface $order, BasketInterface $basket)
    {
        $event = new OrderTransformEvent($order);
        $this->eventDispatcher->dispatch(TransformerEvents::PRE_ORDER_TO_BASKET_TRANSFORM, $event);

        // we reset the current basket
        $basket->reset(true);

        $basket->setCurrency($order->getCurrency());
        $basket->setLocale($order->getLocale());

        // We are free to convert !
        foreach ($order->getOrderElements() as $orderElement) {
            /*
             * @var $orderElement OrderElementInterface
             */
            $provider = $this->productPool->getProvider($orderElement->getProductType());
            $manager = $this->productPool->getManager($orderElement->getProductType());

            $product = $manager->findOneBy(['id' => $orderElement->getProductId()]);

            if (!$product) {
                continue;
            }

            $basketElement = $provider->createBasketElement($product, $orderElement->getOptions());
            $basketElement->setQuantity($orderElement->getQuantity());

            $provider->basketAddProduct($basket, $product, $basketElement);
        }

        $basket->setCustomer($order->getCustomer());

        $basket->buildPrices();

        $event = new BasketTransformEvent($basket);
        $this->eventDispatcher->dispatch(TransformerEvents::POST_ORDER_TO_BASKET_TRANSFORM, $event);

        return $basket;
    }
1338651
protected function copyFromFamily(FamilyInterface $parent)
    {
        foreach ($parent->getAttributes() as $attribute) {
            $this->addAttribute(clone $attribute);
        }
        if ($parent->getAttributeAsLabel()) {
            $this->attributeAsLabel = $this->getAttribute($parent->getAttributeAsLabel()->getCode());
        }
        if ($parent->getAttributeAsIdentifier()) {
            $this->attributeAsIdentifier = $this->getAttribute($parent->getAttributeAsIdentifier()->getCode());
        }
        $this->valueClass = $parent->getValueClass();
        $this->dataClass = $parent->getDataClass();
    }
1159098
public function setOrderQTY($orderQty)
    {
        if (!is_array($orderQty)) {
            $this->orderQty = null;

            return false;
        }
        $isValid = true;
        $index = 0;
        while ($isValid && $index < count($orderQty)) {
            if (is_numeric($orderQty[$index]) && $orderQty[$index] > 0) {
                $isValid = true;
            } else {
                $isValid = false;
            }
            $index++;
        }
        if (!$isValid) {
            $this->orderQty = null;

            return false;
        }
        $this->orderQty = $orderQty;

        return true;
    }
684864
private function synchronizeItems(OrderItemInterface $source, OrderItemInterface $target)
    {
        $accessor = PropertyAccess::createPropertyAccessor();
        foreach (array('designation', 'reference', 'price', 'weight', 'tax') as $property) {
            $value = $accessor->getValue($source, $property);
            if ($accessor->getValue($target, $property) != $value) {
                $accessor->setValue($target, $property, $value);
            }
        }
    }
1136757
private function loadCartLinePrices(CartLineInterface $cartLine)
    {
        $purchasable = $cartLine->getPurchasable();
        $purchasablePrice = $purchasable->getPrice();

        /**
         * If present, reducedPrice will be used as purchasable price in current CartLine.
         */
        if ($purchasable->getReducedPrice()->getAmount() > 0) {
            $purchasablePrice = $purchasable->getReducedPrice();
        }

        /**
         * Setting amounts for current CartLine.
         *
         * Line Currency was set by CartManager::addPurchasable when factorizing CartLine
         */
        $cartLine->setPurchasableAmount($purchasablePrice);
        $cartLine->setAmount($purchasablePrice->multiply($cartLine->getQuantity()));

        return $cartLine;
    }
802232
public function assignSellerWindowToLineAction(OrderLineItem $orderLineItem, $window_id)
    {
        $em = $this->get('doctrine')->getManager();

        $window = $em->getRepository('HarvestCloudCoreBundle:SellerWindow')
            ->find((int) $window_id)
        ;

        $orderLineItem->setSellerWindow($window);

        $em->persist($orderLineItem);
        $em->persist($orderLineItem->getOrder());
        $em->flush();

        return $this->redirect($this->generateUrl('Profile_product_show', array(
            'product_slug' => $orderLineItem->getProduct()->getSlug(),
            'slug'         => $orderLineItem->getProduct()->getSeller()->getSlug(),
        )));
    }
275071
public function truncateOrderCoupons(OrderInterface $order)
    {
        $orderCoupons = $this
            ->orderCouponRepository
            ->findOrderCouponsByOrder($order);

        if ($orderCoupons instanceof Collection) {
            foreach ($orderCoupons as $orderCoupon) {
                $this
                    ->orderCouponObjectManager
                    ->remove($orderCoupon);
            }

            $this
                ->orderCouponObjectManager
                ->flush($orderCoupons->toArray());
        }

        return $this;
    }
130610
public void captureOrderings(OrderingList<?> ordering) {
        try {
            if (ordering != null) {
                for (OrderedProperty<?> orderedProperty : ordering) {
                    ChainedProperty<?> chained = orderedProperty.getChainedProperty();
                    if (!chained.isDerived()) {
                        mRootJoinNode.addJoin(mRepository, chained, mAliasGenerator);
                    }
                }
            }
        } catch (RepositoryException e) {
            throw new UndeclaredThrowableException(e);
        }
    }
280634
public function setLine($line)
    {
        if ($line === null) {
            return;
        }
        $this->parts = $this->outer::translateCommandline($line);
    }
916875
public function apply(OrderInterface $order, PromotionInterface $promotion, array $adjustmentsAmounts): void
    {
        Assert::eq($order->countItems(), count($adjustmentsAmounts));

        $i = 0;
        foreach ($order->getItems() as $item) {
            $adjustmentAmount = $adjustmentsAmounts[$i++];
            if (0 === $adjustmentAmount) {
                continue;
            }

            $this->applyAdjustmentsOnItemUnits($item, $promotion, $adjustmentAmount);
        }
    }