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(''
);
}