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; } }