cleanupLineItem example

foreach ($cart->getDeliveries() as $delivery) {
            $this->cleanupLineItems($delivery->getPositions()->getLineItems()$event->getCustomFieldAllowList());
        }
    }

    /** * @param array<mixed> $customFieldAllowList */
    private function cleanupLineItems(LineItemCollection $lineItems, array $customFieldAllowList): void
    {
        foreach ($lineItems as $lineItem) {
            $this->cleanupLineItem($lineItem$customFieldAllowList);
        }
    }

    /** * @param array<mixed> $customFieldAllowList */
    private function cleanupLineItem(LineItem $lineItem, array $customFieldAllowList): void
    {
        if ($lineItem->getCover()) {
            $lineItem->getCover()->setThumbnailsRo('');
        }

        
Home | Imprint | This part of the site doesn't use cookies.