<?phpnamespace App\Entity;use App\Repository\MarkeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=MarkeRepository::class) */class Marke{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $marke; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $bild; /** * @ORM\OneToMany(targetEntity=Geraete::class, mappedBy="marke") */ private $geraetes; public function __construct() { $this->geraetes = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getMarke(): ?string { return $this->marke; } public function setMarke(string $marke): self { $this->marke = $marke; return $this; } public function getBild(): ?string { return $this->bild; } public function setBild(?string $bild): self { $this->bild = $bild; return $this; } /** * @return Collection<int, Geraete> */ public function getGeraetes(): Collection { return $this->geraetes; } public function addGeraete(Geraete $geraete): self { if (!$this->geraetes->contains($geraete)) { $this->geraetes[] = $geraete; $geraete->setMarke($this); } return $this; } public function removeGeraete(Geraete $geraete): self { if ($this->geraetes->removeElement($geraete)) { // set the owning side to null (unless already changed) if ($geraete->getMarke() === $this) { $geraete->setMarke(null); } } return $this; }}