src/Entity/BCFamille.php line 11
<?php
namespace App\Entity;
use App\Repository\BCFamilleRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: BCFamilleRepository::class)]
class BCFamille
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $pluralName = null;
#[ORM\Column(length: 255)]
private ?string $singularName = null;
#[ORM\OneToMany(mappedBy: 'BCFamille', targetEntity: BCType::class, orphanRemoval: true)]
private Collection $BCTypes;
public function __construct()
{
$this->BCTypes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getPluralName(): ?string
{
return $this->pluralName;
}
public function setPluralName(string $pluralName): self
{
$this->pluralName = $pluralName;
return $this;
}
public function getSingularName(): ?string
{
return $this->singularName;
}
public function setSingularName(string $singularName): self
{
$this->singularName = $singularName;
return $this;
}
/**
* @return Collection<int, BCType>
*/
public function getBCTypes(): Collection
{
return $this->BCTypes;
}
public function addBCType(BCType $bCType): self
{
if (!$this->BCTypes->contains($bCType)) {
$this->BCTypes->add($bCType);
$bCType->setBCFamille($this);
}
return $this;
}
public function removeBCType(BCType $bCType): self
{
if ($this->BCTypes->removeElement($bCType)) {
// set the owning side to null (unless already changed)
if ($bCType->getBCFamille() === $this) {
$bCType->setBCFamille(null);
}
}
return $this;
}
}