setThumbnailsRo example

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

        $this->cleanupCustomFields($lineItem$customFieldAllowList);

        foreach ($lineItem->getChildren() as $child) {
            $this->cleanupLineItem($child$customFieldAllowList);
        }
    }

    /** * @param array<mixed> $customFieldAllowList */
$item = new LineItem($id, 'foo');
        $childItem = new LineItem($id . 'child', 'foo');

        $item->addChild($childItem);

        if ($skipCover === true) {
            return $item;
        }

        $cover = new MediaEntity();
        if ($thumbnailString !== null) {
            $cover->setThumbnailsRo($thumbnailString);
        }

        $item->setCover($cover);

        $coverChild = new MediaEntity();
        if ($thumbnailString !== null) {
            $coverChild->setThumbnailsRo($thumbnailString);
        }

        $childItem->setCover($cover);

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