<?php
namespace App\Entity\Gos;
use App\Repository\Gos\HonorificsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=HonorificsRepository::class)
*/
class Honorifics
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\ManyToMany(targetEntity=PortalSettings::class, inversedBy="honorifics")
*/
private $portalSettings;
public function __construct()
{
$this->portalSettings = new ArrayCollection();
}
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|PortalSettings[]
*/
public function getPortalSettings(): Collection
{
return $this->portalSettings;
}
public function addPortalSetting(PortalSettings $portalSetting): self
{
if (!$this->portalSettings->contains($portalSetting)) {
$this->portalSettings[] = $portalSetting;
}
return $this;
}
public function removePortalSetting(PortalSettings $portalSetting): self
{
if ($this->portalSettings->contains($portalSetting)) {
$this->portalSettings->removeElement($portalSetting);
}
return $this;
}
}