Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

33 rindas
963B

  1. <?php
  2. namespace common\logic\Distribution\PointSaleDistribution\Repository;
  3. use common\logic\AbstractRepositoryQuery;
  4. use common\logic\Distribution\Distribution\Model\Distribution;
  5. use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributionDefinition;
  6. use common\logic\PointSale\PointSale\Model\PointSale;
  7. use yii\db\ActiveQuery;
  8. class PointSaleDistributionRepositoryQuery extends AbstractRepositoryQuery
  9. {
  10. protected PointSaleDistributionDefinition $definition;
  11. public function loadDependencies(): void
  12. {
  13. $this->loadDefinition(PointSaleDistributionDefinition::class);
  14. }
  15. public function filterByDistribution(Distribution $distribution): self
  16. {
  17. $this->andWhere(['id_distribution' => $distribution->id]);
  18. return $this;
  19. }
  20. public function filterByPointSale(PointSale $pointSale): self
  21. {
  22. $this->andWhere(['id_point_sale' => $pointSale->id]);
  23. return $this;
  24. }
  25. }