- <?php
-
- namespace domain\Distribution\DistributionRotating;
-
- use domain\_\AbstractRepositoryQuery;
- use domain\Distribution\Distribution\Distribution;
- use domain\Product\Rotating\Rotating;
- use domain\Product\RotatingProduct\RotatingProduct;
-
- class DistributionRotatingRepositoryQuery extends AbstractRepositoryQuery
- {
- protected DistributionRotatingDefinition $definition;
-
- public function loadDependencies(): void
- {
- $this->loadDefinition(DistributionRotatingDefinition::class);
- }
-
- public function filterByDistribution(Distribution $distribution): self
- {
- $this->andWhere(['distribution_rotating.id_distribution' => $distribution->id]);
- return $this;
- }
-
- public function filterByRotating(Rotating $rotating): self
- {
- $this->andWhere(['distribution_rotating.id_rotating' => $rotating->getId()]);
- return $this;
- }
- }
|