<?phpnamespace App\Entity\Gos;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\Gos\TermsValidationMessageRepository") */class TermsValidationMessage{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="text") */ private $content; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\OneToMany(targetEntity="App\Entity\Gos\Term", mappedBy="termValidationMessage") */ private $terms; public function __construct() { $this->terms = new ArrayCollection(); } public function __toString() { return $this->content; } public function getId(): ?int { return $this->id; } public function getContent(): ?string { return $this->content; } public function setContent(string $content): self { $this->content = $content; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection|Term[] */ public function getTerms(): Collection { return $this->terms; } public function addTerm(Term $term): self { if (!$this->terms->contains($term)) { $this->terms[] = $term; $term->setTermValidationMessage($this); } return $this; } public function removeTerm(Term $term): self { if ($this->terms->contains($term)) { $this->terms->removeElement($term); // set the owning side to null (unless already changed) if ($term->getTermValidationMessage() === $this) { $term->setTermValidationMessage(null); } } return $this; } public function removeAllTerms(): self { foreach ($this->getTerms() as $term) { $this->terms->removeElement($term); if ($term->getTermValidationMessage() === $this) { $term->setTermValidationMessage(null); } } return $this; }}