<?phpnamespace App\Entity;use App\Repository\PropositionStatusRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=PropositionStatusRepository::class) */class PropositionStatus{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\OneToMany(targetEntity=Proposition::class, mappedBy="statut") */ private $propositions; /** * @ORM\Column(type="string", length=255) */ private $badge; /** * @ORM\OneToMany(targetEntity=GroupSuggestion::class, mappedBy="status") */ private $groupSuggestions; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $name_en; public function __construct() { $this->propositions = new ArrayCollection(); $this->groupSuggestions = new ArrayCollection(); } public function __toString(){ return $this->getName(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection<int, Proposition> */ public function getPropositions(): Collection { return $this->propositions; } public function addProposition(Proposition $proposition): self { if (!$this->propositions->contains($proposition)) { $this->propositions[] = $proposition; $proposition->setStatut($this); } return $this; } public function removeProposition(Proposition $proposition): self { if ($this->propositions->removeElement($proposition)) { // set the owning side to null (unless already changed) if ($proposition->getStatut() === $this) { $proposition->setStatut(null); } } return $this; } public function getBadge(): ?string { return $this->badge; } public function setBadge(string $badge): self { $this->badge = $badge; return $this; } /** * @return Collection<int, GroupSuggestion> */ public function getGroupSuggestions(): Collection { return $this->groupSuggestions; } public function addGroupSuggestion(GroupSuggestion $groupSuggestion): self { if (!$this->groupSuggestions->contains($groupSuggestion)) { $this->groupSuggestions[] = $groupSuggestion; $groupSuggestion->setStatus($this); } return $this; } public function removeGroupSuggestion(GroupSuggestion $groupSuggestion): self { if ($this->groupSuggestions->removeElement($groupSuggestion)) { // set the owning side to null (unless already changed) if ($groupSuggestion->getStatus() === $this) { $groupSuggestion->setStatus(null); } } return $this; } public function getNameEn(): ?string { return $this->name_en; } public function setNameEn(?string $name_en): self { $this->name_en = $name_en; return $this; }}