<?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\TagRepository")
*/
class Tag
{
public function __construct()
{
$this->selections = new ArrayCollection();
$this->blocks = new ArrayCollection();
$this->sorts = new ArrayCollection();
$this->webEngines = new ArrayCollection();
$this->webPages = new ArrayCollection();
$this->webLists = new ArrayCollection();
$this->listModels = new ArrayCollection();
$this->webFilters = new ArrayCollection();
$this->scoringProfiles = new ArrayCollection();
$this->diaporama = new ArrayCollection();
$this->webMaps = new ArrayCollection();
}
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="tags")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="owner_id", referencedColumnName="id")
* })
*/
private $owner;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="tags")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="entity_id", referencedColumnName="id")
* })
*/
private $entity;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Selection", mappedBy="tags")
*/
private $selections;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Block", mappedBy="tags")
*/
private $blocks;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\WebSort", mappedBy="tags")
*/
private $sorts;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\WebEngine", mappedBy="tags")
*/
private $webEngines;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\WebPage", mappedBy="tags")
*/
private $webPages;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\WebList", mappedBy="tags")
*/
private $webLists;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\ListModel", mappedBy="tags")
*/
private $listModels;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\WebFilter", mappedBy="tags")
*/
private $webFilters;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\DnsitScoringProfile", mappedBy="tags")
*/
private $scoringProfiles;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Diaporama", mappedBy="tags")
*/
private $diaporama;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\WebMap", mappedBy="tags")
*/
private $webMaps;
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 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;
}
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;
}
/**
* @return Collection|Selection[]
*/
public function getSelections() : Collection
{
return $this->selections;
}
public function addSelection(Selection $selection) : self
{
if (!$this->selections->contains($selection)) {
$this->selections[] = $selection;
$selection->addTag($this);
}
return $this;
}
public function removeSelection(Selection $selection) : self
{
if ($this->selections->contains($selection)) {
$this->selections->removeElement($selection);
$selection->removeTag($this);
}
return $this;
}
/**
* @return Collection|Block[]
*/
public function getBlocks() : Collection
{
return $this->blocks;
}
public function addBlock(Block $block) : self
{
if (!$this->blocks->contains($block)) {
$this->blocks[] = $block;
$block->addTag($this);
}
return $this;
}
public function removeBlock(Block $block) : self
{
if ($this->blocks->contains($block)) {
$this->blocks->removeElement($block);
$block->removeTag($this);
}
return $this;
}
/**
* @return Collection|WebSort[]
*/
public function getSorts() : Collection
{
return $this->sorts;
}
public function addSort(WebSort $sort) : self
{
if (!$this->sorts->contains($sort)) {
$this->sorts[] = $sort;
$sort->addTag($this);
}
return $this;
}
public function removeSort(WebSort $sort) : self
{
if ($this->sorts->contains($sort)) {
$this->sorts->removeElement($sort);
$sort->removeTag($this);
}
return $this;
}
/**
* @return Collection|WebEngine[]
*/
public function getWebEngines() : Collection
{
return $this->webEngines;
}
public function addWebEngine(WebEngine $engine) : self
{
if (!$this->webEngines->contains($engine)) {
$this->webEngines[] = $engine;
$engine->addTag($this);
}
return $this;
}
public function removeWebEngine(WebEngine $engine) : self
{
if ($this->webEngines->contains($engine)) {
$this->webEngines->removeElement($engine);
$engine->removeTag($this);
}
return $this;
}
/**
* @return Collection|WebPage[]
*/
public function getWebPages() : Collection
{
return $this->webPages;
}
public function addWebPage(WebPage $webPage) : self
{
if (!$this->webPages->contains($webPage)) {
$this->webPages[] = $webPage;
$webPage->addTag($this);
}
return $this;
}
public function removeWebPage(WebPage $webPage) : self
{
if ($this->webPages->contains($webPage)) {
$this->webPages->removeElement($webPage);
$webPage->removeTag($this);
}
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->addTag($this);
}
return $this;
}
public function removeWebList(WebList $webList) : self
{
if ($this->webLists->contains($webList)) {
$this->webLists->removeElement($webList);
$webList->removeTag($this);
}
return $this;
}
/**
* @return Collection|ListModel[]
*/
public function getListModels() : Collection
{
return $this->listModels;
}
public function addListModel(ListModel $listModel) : self
{
if (!$this->listModels->contains($listModel)) {
$this->listModels[] = $listModel;
$listModel->addTag($this);
}
return $this;
}
public function removeListModel(ListModel $listModel) : self
{
if ($this->listModels->contains($listModel)) {
$this->listModels->removeElement($listModel);
$listModel->removeTag($this);
}
return $this;
}
/**
* @return Collection|WebFilter[]
*/
public function getWebFilters() : Collection
{
return $this->webFilters;
}
public function addWebFilter(WebFilter $webFilter) : self
{
if (!$this->webFilters->contains($webFilter)) {
$this->webFilters[] = $webFilter;
$webFilter->addTag($this);
}
return $this;
}
public function removeWebFilter(WebFilter $webFilter) : self
{
if ($this->webFilters->contains($webFilter)) {
$this->webFilters->removeElement($webFilter);
$webFilter->removeTag($this);
}
return $this;
}
/**
* @return Collection|DnsitScoringProfile[]
*/
public function getScoringProfiles() : Collection
{
return $this->scoringProfiles;
}
public function addScoringProfile(DnsitScoringProfile $scoringProfile) : self
{
if (!$this->scoringProfiles->contains($scoringProfile)) {
$this->scoringProfiles[] = $scoringProfile;
$scoringProfile->addTag($this);
}
return $this;
}
public function removeScoringProfile(DnsitScoringProfile $scoringProfile) : self
{
if ($this->scoringProfiles->contains($scoringProfile)) {
$this->scoringProfiles->removeElement($scoringProfile);
$scoringProfile->removeTag($this);
}
return $this;
}
/**
* @return Collection|Diaporama[]
*/
public function getDiaporama() : Collection
{
return $this->diaporama;
}
public function addDiaporama(Diaporama $diaporama) : self
{
if (!$this->diaporama->contains($diaporama)) {
$this->diaporama[] = $diaporama;
$diaporama->addTag($this);
}
return $this;
}
public function removeDiaporama(Diaporama $diaporama) : self
{
if ($this->diaporama->contains($diaporama)) {
$this->diaporama->removeElement($diaporama);
$diaporama->removeTag($this);
}
return $this;
}
/**
* @return Collection|WebMap[]
*/
public function getWebMaps() : Collection
{
return $this->webMaps;
}
public function addWebMap(WebMap $webMap) : self
{
if (!$this->webMaps->contains($webMap)) {
$this->webMaps[] = $webMap;
$webMap->addTag($this);
}
return $this;
}
public function removeWebMap(WebMap $webMap) : self
{
if ($this->webMaps->contains($webMap)) {
$this->webMaps->removeElement($webMap);
$webMap->removeTag($this);
}
return $this;
}
}