vendor/shopware/core/Content/Product/SalesChannel/Listing/Filter.php line 11

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product\SalesChannel\Listing;
  3. use Shopware\Core\Framework\DataAbstractionLayer\Search\Aggregation\Aggregation;
  4. use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\Filter as DALFilter;
  5. use Shopware\Core\Framework\Log\Package;
  6. use Shopware\Core\Framework\Struct\Struct;
  7. #[Package('inventory')]
  8. class Filter extends Struct
  9. {
  10.     /**
  11.      * @var string
  12.      */
  13.     protected $name;
  14.     /**
  15.      * @var bool
  16.      */
  17.     protected $filtered;
  18.     /**
  19.      * @var Aggregation[]
  20.      */
  21.     protected $aggregations;
  22.     /**
  23.      * @var DALFilter
  24.      */
  25.     protected $filter;
  26.     /**
  27.      * @var int|float|string|bool|array|null
  28.      */
  29.     protected $values;
  30.     /**
  31.      * @var bool
  32.      */
  33.     protected $exclude;
  34.     /**
  35.      * @param int|float|string|bool|array|null $values
  36.      */
  37.     public function __construct(string $namebool $filtered, array $aggregationsDALFilter $filter$valuesbool $exclude true)
  38.     {
  39.         $this->name $name;
  40.         $this->filtered $filtered;
  41.         $this->aggregations $aggregations;
  42.         $this->filter $filter;
  43.         $this->values $values;
  44.         $this->exclude $exclude;
  45.     }
  46.     public function getName(): string
  47.     {
  48.         return $this->name;
  49.     }
  50.     public function isFiltered(): bool
  51.     {
  52.         return $this->filtered;
  53.     }
  54.     /**
  55.      * @return Aggregation[]
  56.      */
  57.     public function getAggregations(): array
  58.     {
  59.         return $this->aggregations;
  60.     }
  61.     public function getFilter(): DALFilter
  62.     {
  63.         return $this->filter;
  64.     }
  65.     /**
  66.      * @return int|float|string|bool|array|null
  67.      */
  68.     public function getValues()
  69.     {
  70.         return $this->values;
  71.     }
  72.     public function exclude(): bool
  73.     {
  74.         return $this->exclude;
  75.     }
  76. }