<?phpnamespace App\Entity;use App\Repository\LanguageRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=LanguageRepository::class) */class Language{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $language_name; /** * @ORM\Column(type="string", length=255) */ private $language_shortname; /** * @ORM\OneToMany(targetEntity=RewardNotification::class, mappedBy="language") */ private $rewardNotifications; public function __construct() { $this->rewardNotifications = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLanguageName(): ?string { return $this->language_name; } public function setLanguageName(string $language_name): self { $this->language_name = $language_name; return $this; } public function getLanguageShortname(): ?string { return $this->language_shortname; } public function setLanguageShortname(string $language_shortname): self { $this->language_shortname = $language_shortname; return $this; } /** * @return Collection<int, RewardNotification> */ public function getRewardNotifications(): Collection { return $this->rewardNotifications; } public function addRewardNotification(RewardNotification $rewardNotification): self { if (!$this->rewardNotifications->contains($rewardNotification)) { $this->rewardNotifications[] = $rewardNotification; $rewardNotification->setLanguage($this); } return $this; } public function removeRewardNotification(RewardNotification $rewardNotification): self { if ($this->rewardNotifications->removeElement($rewardNotification)) { // set the owning side to null (unless already changed) if ($rewardNotification->getLanguage() === $this) { $rewardNotification->setLanguage(null); } } return $this; }}