Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StockStatusCriteria.php
Go to the documentation of this file.
1 <?php
8 
11 
16 {
20  public function __construct($mapper = '')
21  {
22  $this->mapperInterfaceName = $mapper ?: StockStatusCriteriaMapper::class;
23  $this->data['initial_condition'] = [true];
24  }
25 
29  public function setScopeFilter($scope)
30  {
31  $this->data['website_filter'] = [$scope];
32  }
33 
37  public function setProductsFilter($products)
38  {
39  $this->data['products_filter'] = [$products];
40  }
41 
45  public function setQtyFilter($qty)
46  {
47  $this->data['qty_filter'] = [$qty];
48  }
49 
53  public function addCriteria(\Magento\CatalogInventory\Api\StockStatusCriteriaInterface $criteria)
54  {
55  $this->data[self::PART_CRITERIA_LIST]['list'][] = $criteria;
56  }
57 }
addCriteria(\Magento\CatalogInventory\Api\StockStatusCriteriaInterface $criteria)