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\Product\ProductAccessory;
-
- use domain\_\AbstractRepositoryQuery;
- use domain\Product\Accessory\Accessory;
- use domain\Product\Product\Product;
-
- class ProductAccessoryRepositoryQuery extends AbstractRepositoryQuery
- {
- protected ProductAccessoryDefinition $definition;
-
- public function loadDependencies(): void
- {
- $this->loadDefinition(ProductAccessoryDefinition::class);
- }
-
- public function filterByProduct(Product $product): self
- {
- $this->andWhere(['product_accessory.id_product' => $product->id]);
- return $this;
- }
-
- public function filterByAccessory(Accessory $accessory): self
- {
- $this->andWhere(['product_accessory.id_accessory' => $accessory->id]);
- return $this;
- }
- }
|