<?php
namespace HBCTheme\Subscriber;
use \Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
use Shopware\Core\Content\Product\Events\ProductSearchCriteriaEvent;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ProductListingCriteriaEventSubscriber implements EventSubscriberInterface{
public static function getSubscribedEvents()
{
return [
ProductSearchCriteriaEvent::class => 'addProperties'
];
}
public function addProperties( ProductSearchCriteriaEvent $event)
{
$criteria = $event->getCriteria();
return $criteria;
}
}