'ID', 'id_product' => 'Produit', 'id_accessory' => 'Accessoire', 'quantity' => 'Quantité', ]; } /* Getters / Setters */ public function getId(): ?int { return $this->id; } public function getProduct(): Product { return $this->productRelation; } public function setProduct(Product $product): self { $this->populateFieldObject('id_product', 'productRelation', $product); return $this; } public function getAccessory(): Accessory { return $this->accessoryRelation; } public function setAccessory(Accessory $accessory): self { $this->populateFieldObject('id_accessory', 'accessoryRelation', $accessory); return $this; } public function getQuantity(): ?int { return $this->quantity; } public function setQuantity(?int $quantity): self { $this->quantity = $quantity; return $this; } /* Relations */ public function getProductRelation(): ActiveQuery { return $this->hasOne(Product::class, ['id' => 'id_product']); } public function getAccessoryRelation(): ActiveQuery { return $this->hasOne(Accessory::class, ['id' => 'id_accessory']); } }