src/Sulu/Bundle/Sales/OrderBundle/Order/OrderManager.php
protected function createMediaForItems($items, $locale)
    {
        foreach ($items as $item) {
            $product = $item->getProduct();
            if ($product) {
                $this->productManager->createProductMedia($product, $locale);
            }
            // Set api product for returning media-urls
            $item->setProduct($product);
        }
    }
protected function createMediaForItems($items, $locale)
    {
        foreach ($items as $item) {
            $product = $item->getProduct();
            if ($product) {
                $this->productManager->createProductMedia($product, $locale);
            }
            // Set api product for returning media-urls
            $item->setProduct($product);
        }
    }
protected function createMediaForItems ( $ items , $ locale ) { foreach ( $ items as $ item ) { $ product = $ item -> getProduct ( ) ; if ( $ product ) { $ this -> productManager -> createProductMedia ( $ product , $ locale ) ; } // Set api product for returning media-urls $ item -> setProduct ( $ product ) ; } }
Creates correct media-api for items array

@param array $items
@param string $locale
Creates correct media - api for items array