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.
|
- <?php
-
- namespace domain\Distribution\ProductDistribution;
-
- use domain\Distribution\Distribution\Distribution;
- use domain\Product\Product\Product;
- use domain\_\AbstractRepositoryQuery;
-
- class ProductDistributionRepositoryQuery extends AbstractRepositoryQuery
- {
- protected ProductDistributionDefinition $definition;
-
- public function loadDependencies(): void
- {
- $this->loadDefinition(ProductDistributionDefinition::class);
- }
-
- public function filterByDistribution(Distribution $distribution): self
- {
- $this->andWhere(['id_distribution' => $distribution->id]);
-
- return $this;
- }
-
- public function filterByProduct(Product $product): self
- {
- $this->andWhere(['id_product' => $product->id]);
-
- return $this;
- }
- }
|