Skip to content

Commit

Permalink
[StorageList] fix missing classes
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Mar 15, 2023
1 parent ff77104 commit c1b3751
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 11 additions & 1 deletion src/CoreShop/Bundle/OrderBundle/Manager/CartManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
use CoreShop\Component\Order\Processor\CartProcessorInterface;
use CoreShop\Component\Pimcore\DataObject\VersionHelper;
use CoreShop\Component\Resource\Service\FolderCreationServiceInterface;
use CoreShop\Component\StorageList\Model\StorageListInterface;
use CoreShop\Component\StorageList\StorageListManagerInterface;
use Doctrine\DBAL\Connection;
use Webmozart\Assert\Assert;

final class CartManager implements CartManagerInterface
final class CartManager implements CartManagerInterface, StorageListManagerInterface
{
public function __construct(
private CartProcessorInterface $cartProcessor,
Expand All @@ -35,6 +38,13 @@ public function __construct(
) {
}

public function persist(StorageListInterface $storageList): void
{
Assert::isInstanceOf($storageList, OrderInterface::class);

$this->persistCart($storageList);
}

public function persistCart(OrderInterface $cart): void
{
$cartsFolder = $this->folderCreationService->createFolderForResource($cart, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ services:
- '@coreshop.factory.wishlist.storage_list.inner'

coreshop.wishlist.context.factory:
class: CoreShop\Component\StorageList\Context\StorageListContext
class: CoreShop\Component\StorageList\Context\StorageListFactoryContext
arguments:
- '@coreshop.factory.wishlist'
tags:
- { name: coreshop.context.wishlist, priority: -999 }


CoreShop\Bundle\WishlistBundle\Form\Type\WishlistType:
arguments:
- '%coreshop.model.wishlist.class%'
Expand Down

0 comments on commit c1b3751

Please sign in to comment.