StockItemCriteriaInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CatalogInventory\Api;
  7. /**
  8. * Interface StockItemCriteriaInterface
  9. * @api
  10. * @since 100.0.2
  11. *
  12. * @deprecated 100.3.0 Replaced with Multi Source Inventory
  13. * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  14. * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  15. */
  16. interface StockItemCriteriaInterface extends \Magento\Framework\Api\CriteriaInterface
  17. {
  18. /**
  19. * Add Criteria object
  20. *
  21. * @param \Magento\CatalogInventory\Api\StockItemCriteriaInterface $criteria
  22. * @return bool
  23. */
  24. public function addCriteria(\Magento\CatalogInventory\Api\StockItemCriteriaInterface $criteria);
  25. /**
  26. * Join Stock Status to collection
  27. *
  28. * @param int $storeId
  29. * @return bool
  30. */
  31. public function setStockStatus($storeId = null);
  32. /**
  33. * Add stock filter to collection
  34. *
  35. * @param \Magento\CatalogInventory\Api\Data\StockInterface $stock
  36. * @return bool
  37. */
  38. public function setStockFilter($stock);
  39. /**
  40. * Add scope filter to collection
  41. *
  42. * @param int $scope
  43. * @return bool
  44. */
  45. public function setScopeFilter($scope);
  46. /**
  47. * Add product filter to collection
  48. *
  49. * @param int|int[] $products
  50. * @return bool
  51. */
  52. public function setProductsFilter($products);
  53. /**
  54. * Add Managed Stock products filter to collection
  55. *
  56. * @param bool $isStockManagedInConfig
  57. * @return bool
  58. */
  59. public function setManagedFilter($isStockManagedInConfig);
  60. /**
  61. * Add filter by quantity to collection
  62. *
  63. * @param string $comparisonMethod
  64. * @param float $qty
  65. * @return bool
  66. */
  67. public function setQtyFilter($comparisonMethod, $qty);
  68. }