Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

30 linhas
886B

  1. <?php
  2. namespace domain\Distribution\DistributionRotating;
  3. use domain\_\AbstractRepositoryQuery;
  4. use domain\Distribution\Distribution\Distribution;
  5. use domain\Product\Rotating\Rotating;
  6. use domain\Product\RotatingProduct\RotatingProduct;
  7. class DistributionRotatingRepositoryQuery extends AbstractRepositoryQuery
  8. {
  9. protected DistributionRotatingDefinition $definition;
  10. public function loadDependencies(): void
  11. {
  12. $this->loadDefinition(DistributionRotatingDefinition::class);
  13. }
  14. public function filterByDistribution(Distribution $distribution): self
  15. {
  16. $this->andWhere(['distribution_rotating.id_distribution' => $distribution->id]);
  17. return $this;
  18. }
  19. public function filterByRotating(Rotating $rotating): self
  20. {
  21. $this->andWhere(['distribution_rotating.id_rotating' => $rotating->getId()]);
  22. return $this;
  23. }
  24. }