<?php
namespace App\Entity;
use App\Repository\Criteria3Repository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=Criteria3Repository::class)
*/
class Criteria3
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\OneToMany(targetEntity=Criteria3Item::class, mappedBy="criteria3", orphanRemoval=true, cascade={"persist"})
*/
private $criteria3Items;
public function __construct()
{
$this->criteria3Items = 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<int, Criteria3Item>
*/
public function getCriteria3Items(): Collection
{
return $this->criteria3Items;
}
public function addCriteria3Item(Criteria3Item $criteria3Item): self
{
if (!$this->criteria3Items->contains($criteria3Item)) {
$this->criteria3Items[] = $criteria3Item;
$criteria3Item->setCriteria3($this);
}
return $this;
}
public function removeCriteria3Item(Criteria3Item $criteria3Item): self
{
if ($this->criteria3Items->removeElement($criteria3Item)) {
// set the owning side to null (unless already changed)
if ($criteria3Item->getCriteria3() === $this) {
$criteria3Item->setCriteria3(null);
}
}
return $this;
}
}