<?phpnamespace App\Entity;use App\Repository\GuideRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=GuideRepository::class) */class Guide{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $titre; /** * @ORM\Column(type="text", nullable=true) */ private $description; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $lienvideo; /** * @ORM\ManyToOne(targetEntity=TypeGuide::class, inversedBy="guides") */ private $typeguide; /** * @ORM\OneToMany(targetEntity=Screenshot::class, mappedBy="guide") */ private $screenshots; public function __construct() { $this->screenshots = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitre(): ?string { return $this->titre; } public function setTitre(string $titre): self { $this->titre = $titre; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getLienvideo(): ?string { return $this->lienvideo; } public function setLienvideo(?string $lienvideo): self { $this->lienvideo = $lienvideo; return $this; } public function getTypeguide(): ?TypeGuide { return $this->typeguide; } public function setTypeguide(?TypeGuide $typeguide): self { $this->typeguide = $typeguide; return $this; } /** * @return Collection<int, Screenshot> */ public function getScreenshots(): Collection { return $this->screenshots; } public function addScreenshot(Screenshot $screenshot): self { if (!$this->screenshots->contains($screenshot)) { $this->screenshots[] = $screenshot; $screenshot->setGuide($this); } return $this; } public function removeScreenshot(Screenshot $screenshot): self { if ($this->screenshots->removeElement($screenshot)) { // set the owning side to null (unless already changed) if ($screenshot->getGuide() === $this) { $screenshot->setGuide(null); } } return $this; }}