@@ -4,12 +4,10 @@ discard block |
||
4 | 4 | |
5 | 5 | use FOS\RestBundle\View\View; |
6 | 6 | use FOS\RestBundle\View\ViewHandlerInterface; |
7 | -use Liip\ImagineBundle\Imagine\Cache\CacheManager; |
|
8 | 7 | use Pagerfanta\Adapter\DoctrineORMAdapter; |
9 | 8 | use Pagerfanta\Pagerfanta; |
10 | 9 | use Sylius\Component\Channel\Repository\ChannelRepositoryInterface; |
11 | 10 | use Sylius\Component\Core\Model\ChannelInterface; |
12 | -use Sylius\Component\Core\Model\ProductImage; |
|
13 | 11 | use Sylius\Component\Core\Model\ProductImageInterface; |
14 | 12 | use Sylius\Component\Core\Model\ProductInterface; |
15 | 13 | use Sylius\Component\Core\Model\ProductVariantInterface; |
@@ -17,7 +15,6 @@ discard block |
||
17 | 15 | use Sylius\Component\Core\Repository\ProductRepositoryInterface; |
18 | 16 | use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; |
19 | 17 | use Sylius\ShopApiPlugin\Factory\ImageViewFactoryInterface; |
20 | -use Sylius\ShopApiPlugin\View\ImageView; |
|
21 | 18 | use Sylius\ShopApiPlugin\View\PageLinksView; |
22 | 19 | use Sylius\ShopApiPlugin\View\PageView; |
23 | 20 | use Sylius\ShopApiPlugin\View\ProductVariantView; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | /** @var ProductImageInterface $image */ |
151 | 151 | foreach ($product->getImages() as $image) { |
152 | 152 | foreach ($image->getProductVariants() as $productVariant) { |
153 | - if ($variant === $productVariant){ |
|
153 | + if ($variant === $productVariant) { |
|
154 | 154 | $itemView->variant->images[] = $imageViewFactory->create($image); |
155 | 155 | } |
156 | 156 | } |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | return $product->getVariants()[0]; |
383 | 383 | } |
384 | 384 | |
385 | - if ($product->hasOptions()){ |
|
385 | + if ($product->hasOptions()) { |
|
386 | 386 | return $this->getVariant($request->request->get('options'), $product); |
387 | 387 | } |
388 | 388 |