custom/plugins/SwagCustomizedProducts/src/Core/Content/Product/SalesChannel/SalesChannelProductRepositoryDecorator.php line 34

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. /*
  3.  * (c) shopware AG <info@shopware.com>
  4.  * For the full copyright and license information, please view the LICENSE
  5.  * file that was distributed with this source code.
  6.  */
  7. namespace Swag\CustomizedProducts\Core\Content\Product\SalesChannel;
  8. use Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection;
  9. use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
  10. use Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult;
  11. use Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult;
  12. use Shopware\Core\System\SalesChannel\Entity\SalesChannelRepositoryInterface;
  13. use Shopware\Core\System\SalesChannel\SalesChannelContext;
  14. use Swag\CustomizedProducts\Migration\Migration1565933910TemplateProduct;
  15. class SalesChannelProductRepositoryDecorator implements SalesChannelRepositoryInterface
  16. {
  17.     /**
  18.      * @var SalesChannelRepositoryInterface
  19.      */
  20.     private $inner;
  21.     public function __construct(SalesChannelRepositoryInterface $inner)
  22.     {
  23.         $this->inner $inner;
  24.     }
  25.     public function search(Criteria $criteriaSalesChannelContext $salesChannelContext): EntitySearchResult
  26.     {
  27.         $criteria->addAssociation(Migration1565933910TemplateProduct::PRODUCT_TEMPLATE_INHERITANCE_COLUMN);
  28.         return $this->inner->search($criteria$salesChannelContext);
  29.     }
  30.     /*
  31.      * Unchanged Methods
  32.      */
  33.     public function searchIds(Criteria $criteriaSalesChannelContext $salesChannelContext): IdSearchResult
  34.     {
  35.         return $this->inner->searchIds($criteria$salesChannelContext);
  36.     }
  37.     public function aggregate(Criteria $criteriaSalesChannelContext $salesChannelContext): AggregationResultCollection
  38.     {
  39.         return $this->inner->aggregate($criteria$salesChannelContext);
  40.     }
  41. }