<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\SelectionRepository")
*/
class Selection
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom de la sélection"})
*/
private $name;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\DnsitScoringProfile", inversedBy="selections")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="scoring_id", referencedColumnName="id")
* })
*/
private $score;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $reduceFromDistance;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $reduceUntilDistance;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $reduce;
/**
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(targetEntity="App\Entity\SelectionItem", mappedBy="selection", cascade={"persist","remove"}, orphanRemoval=true)
*/
private $items;
/**
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(targetEntity="App\Entity\WebList", mappedBy="selection", cascade={"persist"})
*/
private $webLists;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="selections")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="owner_id", referencedColumnName="id")
* })
*/
private $owner;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="selections")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="entity_id", referencedColumnName="id")
* })
*/
private $entity;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(type="integer", nullable=true, options={"default":0, "comment":"code de statut : 0=OK"})
*/
private $state;
/**
* @ORM\Column(type="integer", nullable=true, options={"default":0, "comment":"ID de seleciton dans le SIT"})
*/
private $sitSelectionId;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Tag", inversedBy="selections")
*/
private $tags;
/**
* @ORM\OneToMany(targetEntity="App\Entity\EditionPlanification", mappedBy="selection")
*/
private $planifications;
/**
* @ORM\OneToMany(targetEntity="App\Entity\EditionPlanification", mappedBy="selectionGuideAccueil")
*/
private $guidesAccueilPlanifications;
/**
* @ORM\OneToMany(targetEntity="App\Entity\EditionsPlanner", mappedBy="selectionGuideAccueil")
*/
private $guidesAccueilPlanners;
/**
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(targetEntity="App\Entity\WebMapItem", mappedBy="selection")
*/
private $webMapItems;
/**
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(targetEntity="App\Entity\Diaporama", mappedBy="selection")
*/
private $diaporamas;
/**
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(targetEntity="App\Entity\DeeplTranslationConfig", mappedBy="selection")
*/
private $deeplTranslationConfigs;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\ApidaeTranslationConfig", mappedBy="selection", cascade={"persist", "remove"})
*/
private $apidaeTranslationConfigs;
/**
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(targetEntity="App\Entity\WebFilterResult", mappedBy="selection")
*/
private $webFilterResults;
public function __construct()
{
$this->items = new ArrayCollection();
$this->webLists = new ArrayCollection();
$this->tags = new ArrayCollection();
$this->planifications = new ArrayCollection();
$this->guidesAccueilPlanifications = new ArrayCollection();
$this->guidesAccueilPlanners = new ArrayCollection();
$this->webMapItems = new ArrayCollection();
$this->diaporamas = new ArrayCollection();
$this->deeplTranslationConfigs = new ArrayCollection();
$this->apidaeTranslationConfigs = new ArrayCollection();
$this->webFilterResults = 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;
}
public function getReduceFromDistance(): ?float
{
return $this->reduceFromDistance;
}
public function setReduceFromDistance(?float $reduceFromDistance): self
{
$this->reduceFromDistance = $reduceFromDistance;
return $this;
}
public function getReduceUntilDistance(): ?float
{
return $this->reduceUntilDistance;
}
public function setReduceUntilDistance(?float $reduceUntilDistance): self
{
$this->reduceUntilDistance = $reduceUntilDistance;
return $this;
}
public function getReduce(): ?float
{
return $this->reduce;
}
public function setReduce(?float $reduce): self
{
$this->reduce = $reduce;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getState(): ?int
{
return $this->state;
}
public function setState(?int $state): self
{
$this->state = $state;
return $this;
}
public function getSitSelectionId(): ?int
{
return $this->sitSelectionId;
}
public function setSitSelectionId(?int $sitSelectionId): self
{
$this->sitSelectionId = $sitSelectionId;
return $this;
}
public function getScore(): ?DnsitScoringProfile
{
return $this->score;
}
public function setScore(?DnsitScoringProfile $score): self
{
$this->score = $score;
return $this;
}
/**
* @return Collection|SelectionItem[]
*/
public function getItems(): Collection
{
return $this->items;
}
public function addItem(SelectionItem $item): self
{
if (!$this->items->contains($item)) {
$this->items[] = $item;
$item->setSelection($this);
}
return $this;
}
public function removeItem(SelectionItem $item): self
{
if ($this->items->contains($item)) {
$this->items->removeElement($item);
// set the owning side to null (unless already changed)
if ($item->getSelection() === $this) {
$item->setSelection(null);
}
}
return $this;
}
/**
* @return Collection|WebList[]
*/
public function getWebLists(): Collection
{
return $this->webLists;
}
public function addWebList(WebList $webList): self
{
if (!$this->webLists->contains($webList)) {
$this->webLists[] = $webList;
$webList->setSelection($this);
}
return $this;
}
public function removeWebList(WebList $webList): self
{
if ($this->webLists->contains($webList)) {
$this->webLists->removeElement($webList);
// set the owning side to null (unless already changed)
if ($webList->getSelection() === $this) {
$webList->setSelection(null);
}
}
return $this;
}
/**
* @return Collection|Tag[]
*/
public function getTags(): Collection
{
return $this->tags;
}
public function addTag(Tag $tag): self
{
if (!$this->tags->contains($tag)) {
$this->tags[] = $tag;
}
return $this;
}
public function removeTag(Tag $tag): self
{
if ($this->tags->contains($tag)) {
$this->tags->removeElement($tag);
}
return $this;
}
public function getOwner(): ?User
{
return $this->owner;
}
public function setOwner(?User $owner): self
{
$this->owner = $owner;
return $this;
}
public function getEntity(): ?DnsitEntity
{
return $this->entity;
}
public function setEntity(?DnsitEntity $entity): self
{
$this->entity = $entity;
return $this;
}
/**
* @return Collection|EditionPlanification[]
*/
public function getPlanifications(): Collection
{
return $this->planifications;
}
public function addPlanification(EditionPlanification $planification): self
{
if (!$this->planifications->contains($planification)) {
$this->planifications[] = $planification;
$planification->setSelection($this);
}
return $this;
}
public function removePlanification(EditionPlanification $planification): self
{
if ($this->planifications->contains($planification)) {
$this->planifications->removeElement($planification);
// set the owning side to null (unless already changed)
if ($planification->getSelection() === $this) {
$planification->setSelection(null);
}
}
return $this;
}
/**
* @return Collection|EditionPlanification[]
*/
public function getGuidesAccueilPlanifications(): Collection
{
return $this->guidesAccueilPlanifications;
}
public function addGuidesAccueilPlanifications(EditionPlanification $planification): self
{
if (!$this->guidesAccueilPlanifications->contains($planification)) {
$this->guidesAccueilPlanifications[] = $planification;
$planification->setSelectionGuideAccueil($this);
}
return $this;
}
public function removeGuidesAccueilPlanification(EditionPlanification $planification): self
{
if ($this->guidesAccueilPlanifications->contains($planification)) {
$this->guidesAccueilPlanifications->removeElement($planification);
// set the owning side to null (unless already changed)
if ($planification->getSelectionGuideAccueil() === $this) {
$planification->setSelectionGuideAccueil(null);
}
}
return $this;
}
/**
* @return Collection|EditionsPlanner[]
*/
public function getGuidesAccueilPlanners(): Collection
{
return $this->guidesAccueilPlanners;
}
public function addGuidesAccueilPlanner(EditionsPlanner $planner): self
{
if (!$this->guidesAccueilPlanners->contains($planner)) {
$this->guidesAccueilPlanners[] = $planner;
$planner->setSelectionGuideAccueil($this);
}
return $this;
}
public function removeGuidesAccueilPlanner(EditionsPlanner $planner): self
{
if ($this->guidesAccueilPlanners->contains($planner)) {
$this->guidesAccueilPlanners->removeElement($planner);
// set the owning side to null (unless already changed)
if ($planner->getSelectionGuideAccueil() === $this) {
$planner->setSelectionGuideAccueil(null);
}
}
return $this;
}
/**
* @return Collection|WebMapItem[]
*/
public function getWebMapItems(): Collection
{
return $this->webMapItems;
}
public function addWebMapItem(WebMapItem $webMapItem): self
{
if (!$this->webMapItems->contains($webMapItem)) {
$this->webMapItems[] = $webMapItem;
$webMapItem->setSelection($this);
}
return $this;
}
public function removeWebMapItem(WebMapItem $webMapItem): self
{
if ($this->webMapItems->contains($webMapItem)) {
$this->webMapItems->removeElement($webMapItem);
// set the owning side to null (unless already changed)
if ($webMapItem->getSelection() === $this) {
$webMapItem->setSelection(null);
}
}
return $this;
}
/**
* @return Collection|Diaporama[]
*/
public function getDiaporamas(): Collection
{
return $this->diaporamas;
}
public function addDiaporama(Diaporama $diaporama): self
{
if (!$this->diaporamas->contains($diaporama)) {
$this->diaporamas[] = $diaporama;
$diaporama->setSelection($this);
}
return $this;
}
public function removeDiaporama(Diaporama $diaporama): self
{
if ($this->diaporamas->contains($diaporama)) {
$this->diaporamas->removeElement($diaporama);
// set the owning side to null (unless already changed)
if ($diaporama->getSelection() === $this) {
$diaporama->setSelection(null);
}
}
return $this;
}
/**
* @return Collection|DeeplTranslationConfig[]
*/
public function getDeeplTranslationConfigs(): Collection
{
return $this->deeplTranslationConfigs;
}
public function addDeeplTranslationConfig(DeeplTranslationConfig $deeplTranslationConfig): self
{
if (!$this->deeplTranslationConfigs->contains($deeplTranslationConfig)) {
$this->deeplTranslationConfigs[] = $deeplTranslationConfig;
$deeplTranslationConfig->setSelection($this);
}
return $this;
}
public function removeDeeplTranslationConfig(DeeplTranslationConfig $deeplTranslationConfig): self
{
if ($this->deeplTranslationConfigs->contains($deeplTranslationConfig)) {
$this->deeplTranslationConfigs->removeElement($deeplTranslationConfig);
// set the owning side to null (unless already changed)
if ($deeplTranslationConfig->getSelection() === $this) {
$deeplTranslationConfig->setSelection(null);
}
}
return $this;
}
/**
* @return Collection|ApidaeTranslationConfig[]
*/
public function getApidaeTranslationConfigs(): Collection
{
return $this->apidaeTranslationConfigs;
}
public function addApidaeTranslationConfig(ApidaeTranslationConfig $apidaeTranslationConfigs): self
{
if (!$this->apidaeTranslationConfigs->contains($apidaeTranslationConfigs)) {
$this->apidaeTranslationConfigs[] = $apidaeTranslationConfigs;
$apidaeTranslationConfigs->setSelection($this);
}
return $this;
}
public function removeApidaeTranslationConfig(ApidaeTranslationConfig $apidaeTranslationConfigs): self
{
if ($this->apidaeTranslationConfigs->contains($apidaeTranslationConfigs)) {
$this->apidaeTranslationConfigs->removeElement($apidaeTranslationConfigs);
// set the owning side to null (unless already changed)
if ($apidaeTranslationConfigs->getSelection() === $this) {
$apidaeTranslationConfigs->setSelection(null);
}
}
return $this;
}
/**
* @return Collection|WebFilterResult[]
*/
public function getWebFilterResults(): Collection
{
return $this->webFilterResults;
}
public function addWebFilterResult(WebFilterResult $webFilterResult): self
{
if (!$this->webFilterResults->contains($webFilterResult)) {
$this->webFilterResults[] = $webFilterResult;
$webFilterResult->setSelection($this);
}
return $this;
}
public function removeWebFilterResult(WebFilterResult $webFilterResult): self
{
if ($this->webFilterResults->contains($webFilterResult)) {
$this->webFilterResults->removeElement($webFilterResult);
// set the owning side to null (unless already changed)
if ($webFilterResult->getSelection() === $this) {
$webFilterResult->setSelection(null);
}
}
return $this;
}
}