<?php
namespace App\Entity;
use App\Repository\EquipementsCuisineRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EquipementsCuisineRepository::class)
*/
class EquipementsCuisine
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $labels;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $slugEquipementsCuisine;
/**
* @ORM\ManyToMany(targetEntity=Product::class, inversedBy="equipementsCuisines")
*/
private $product;
public function __construct()
{
$this->product = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLabels(): ?string
{
return $this->labels;
}
public function setLabels(?string $labels): self
{
$this->labels = $labels;
return $this;
}
public function getSlugEquipementsCuisine(): ?string
{
return $this->slugEquipementsCuisine;
}
public function setSlugEquipementsCuisine(?string $slugEquipementsCuisine): self
{
$this->slugEquipementsCuisine = $slugEquipementsCuisine;
return $this;
}
/**
* @return Collection<int, Product>
*/
public function getProduct(): Collection
{
return $this->product;
}
public function addProduct(Product $product): self
{
if (!$this->product->contains($product)) {
$this->product[] = $product;
}
return $this;
}
public function removeProduct(Product $product): self
{
$this->product->removeElement($product);
return $this;
}
}