vendor/shopware/core/Checkout/Cart/LineItem/Group/ProductLineItemProvider.php line 12

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Checkout\Cart\LineItem\Group;
  3. use Shopware\Core\Checkout\Cart\Cart;
  4. use Shopware\Core\Checkout\Cart\LineItem\LineItem;
  5. use Shopware\Core\Checkout\Cart\LineItem\LineItemCollection;
  6. use Shopware\Core\Framework\Log\Package;
  7. use Shopware\Core\Framework\Plugin\Exception\DecorationPatternException;
  8. #[Package('checkout')]
  9. class ProductLineItemProvider extends AbstractProductLineItemProvider
  10. {
  11.     public function getDecorated(): AbstractProductLineItemProvider
  12.     {
  13.         throw new DecorationPatternException(self::class);
  14.     }
  15.     public function getProducts(Cart $cart): LineItemCollection
  16.     {
  17.         return $cart->getLineItems()->filterType(LineItem::PRODUCT_LINE_ITEM_TYPE);
  18.     }
  19. }