You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PointSaleDistributionRepositoryQuery.php 949B

пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 6 месеци
пре 1 година
12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace domain\Distribution\PointSaleDistribution;
  3. use domain\Distribution\Distribution\Distribution;
  4. use domain\PointSale\PointSale\PointSale;
  5. use domain\_\AbstractRepositoryQuery;
  6. class PointSaleDistributionRepositoryQuery extends AbstractRepositoryQuery
  7. {
  8. protected PointSaleDistributionDefinition $definition;
  9. public function loadDependencies(): void
  10. {
  11. $this->loadDefinition(PointSaleDistributionDefinition::class);
  12. }
  13. public function filterByDistribution(Distribution $distribution): self
  14. {
  15. $this->andWhere(['id_distribution' => $distribution->id]);
  16. return $this;
  17. }
  18. public function filterByPointSale(PointSale $pointSale): self
  19. {
  20. $this->andWhere(['id_point_sale' => $pointSale->id]);
  21. return $this;
  22. }
  23. public function filterIsDelivery(bool $delivery)
  24. {
  25. $this->andWhere(['delivery' => $delivery ? 1 : 0]);
  26. return $this;
  27. }
  28. }