<?php
namespace TheatreCore\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Classifications
*
* @ORM\Table(name="classifications", uniqueConstraints={@ORM\UniqueConstraint(name="classification", columns={"classification"})}, indexes={@ORM\Index(name="type", columns={"type"}), @ORM\Index(name="idgroupclassification", columns={"idgroupclassification"})})
* @ORM\Entity(repositoryClass="TheatreCore\Repository\ClassificationsRepository")
*/
class Classifications
{
/**
* @var int
*
* @ORM\Column(name="idclassification", type="integer", nullable=false, options={"unsigned"=true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $idclassification;
/**
* @var string
*
* @ORM\Column(name="classification", type="string", length=255, nullable=false)
*
* @Assert\NotBlank(message="Classification : veuillez préciser l'identifiant de classification")
* @Assert\Regex(
* pattern="#^class_.+#",
* match=true,
* message="Classification : l'identifiant doit commencer par « class_ »"
* )
*
*/
private $classification;
/**
* @var string|null
*
* @ORM\Column(name="public_name", type="string", length=255, nullable=true)
*
*/
private $publicName;
/**
* @var string
*
* @ORM\Column(name="type", type="string", length=0, nullable=false)
*/
private $type;
/**
* @var bool
*
* @ORM\Column(name="texts", type="boolean", nullable=false)
*/
private $texts = false;
/**
* @var bool
*
* @ORM\Column(name="spectacles", type="boolean", nullable=false)
*/
private $spectacles = false;
/**
* @var bool
*
* @ORM\Column(name="persons", type="boolean", nullable=false)
*/
private $persons = false;
/**
* @var bool
*
* @ORM\Column(name="contacts", type="boolean", nullable=false)
*/
private $contacts = false;
/**
* @var bool
*
* @ORM\Column(name="contents", type="boolean", nullable=false)
*/
private $contents = false;
/**
* @var bool
*
* @ORM\Column(name="files", type="boolean", nullable=false)
*/
private $files = false;
/**
* @var bool
*
* @ORM\Column(name="multimedias", type="boolean", nullable=false)
*/
private $multimedias = false;
/**
* @var bool
*
* @ORM\Column(name="dvds", type="boolean", nullable=false)
*/
private $dvds = false;
/**
* @var bool
*
* @ORM\Column(name="playlists", type="boolean", nullable=false)
*/
private $playlists = false;
/**
* @var bool
*
* @ORM\Column(name="lagarce", type="boolean", nullable=false)
*/
private $lagarce = false;
/**
* @var int|null
*
* @ORM\Column(name="idgroupclassification", type="smallint", nullable=true, options={"unsigned"=true})
*/
private $idgroupclassification;
/**
* @var bool|null
*
* @ORM\Column(name="is_public", type="boolean", nullable=true)
*/
private $isPublic = false;
/**
* @var int|null
*
* @ORM\Column(name="`range`", type="smallint", nullable=true, options={"unsigned"=true})
*/
private $range;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Modules", inversedBy="idclassification")
* @ORM\JoinTable(name="classification_module",
* joinColumns={
* @ORM\JoinColumn(name="idclassification", referencedColumnName="idclassification")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="module", referencedColumnName="module")
* }
* )
*/
private $module;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Contacts", mappedBy="idclassification")
*/
private $idcontact;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Contents", mappedBy="content_classification")
*/
private $idcontent;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Files", mappedBy="idclassification")
*/
private $idfile;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Multimedias", mappedBy="idclassification")
*/
private $idmultimedia;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Persons", mappedBy="person_classification")
*/
private $idperson;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Playlists", mappedBy="idclassification")
*/
private $idplaylist;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Spectacles", mappedBy="idclassification")
*/
private $idspectacle;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Templates", mappedBy="idclassification")
*/
private $idtemplate;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Texts", mappedBy="text_classification")
*/
private $idtext;
/**
* Constructor
*/
public function __construct()
{
$this->module = new \Doctrine\Common\Collections\ArrayCollection();
$this->idcontact = new \Doctrine\Common\Collections\ArrayCollection();
$this->idcontent = new \Doctrine\Common\Collections\ArrayCollection();
$this->idfile = new \Doctrine\Common\Collections\ArrayCollection();
$this->idmultimedia = new \Doctrine\Common\Collections\ArrayCollection();
$this->idperson = new \Doctrine\Common\Collections\ArrayCollection();
$this->idplaylist = new \Doctrine\Common\Collections\ArrayCollection();
$this->idspectacle = new \Doctrine\Common\Collections\ArrayCollection();
$this->idtemplate = new \Doctrine\Common\Collections\ArrayCollection();
$this->idtext = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get idclassification.
*
* @return int
*/
public function getIdclassification()
{
return $this->idclassification;
}
/**
* Set classification.
*
* @param string $classification
*
* @return Classifications
*/
public function setClassification($classification)
{
$this->classification = $classification;
return $this;
}
/**
* Get classification.
*
* @return string
*/
public function getClassification()
{
return $this->classification;
}
/**
* Set publicName.
*
* @param string|null $publicName
*
* @return Classifications
*/
public function setPublicName($publicName = null)
{
$this->publicName = $publicName;
return $this;
}
/**
* Get publicName.
*
* @return string|null
*/
public function getPublicName()
{
return $this->publicName;
}
/**
* Set type.
*
* @param string $type
*
* @return Classifications
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Get type.
*
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Set texts.
*
* @param bool $texts
*
* @return Classifications
*/
public function setTexts($texts)
{
$this->texts = $texts;
return $this;
}
/**
* Get texts.
*
* @return bool
*/
public function getTexts()
{
return $this->texts;
}
/**
* Set spectacles.
*
* @param bool $spectacles
*
* @return Classifications
*/
public function setSpectacles($spectacles)
{
$this->spectacles = $spectacles;
return $this;
}
/**
* Get spectacles.
*
* @return bool
*/
public function getSpectacles()
{
return $this->spectacles;
}
/**
* Set persons.
*
* @param bool $persons
*
* @return Classifications
*/
public function setPersons($persons)
{
$this->persons = $persons;
return $this;
}
/**
* Get persons.
*
* @return bool
*/
public function getPersons()
{
return $this->persons;
}
/**
* Set contacts.
*
* @param bool $contacts
*
* @return Classifications
*/
public function setContacts($contacts)
{
$this->contacts = $contacts;
return $this;
}
/**
* Get contacts.
*
* @return bool
*/
public function getContacts()
{
return $this->contacts;
}
/**
* Set contents.
*
* @param bool $contents
*
* @return Classifications
*/
public function setContents($contents)
{
$this->contents = $contents;
return $this;
}
/**
* Get contents.
*
* @return bool
*/
public function getContents()
{
return $this->contents;
}
/**
* Set files.
*
* @param bool $files
*
* @return Classifications
*/
public function setFiles($files)
{
$this->files = $files;
return $this;
}
/**
* Get files.
*
* @return bool
*/
public function getFiles()
{
return $this->files;
}
/**
* Set multimedias.
*
* @param bool $multimedias
*
* @return Classifications
*/
public function setMultimedias($multimedias)
{
$this->multimedias = $multimedias;
return $this;
}
/**
* Get multimedias.
*
* @return bool
*/
public function getMultimedias()
{
return $this->multimedias;
}
/**
* Set dvds.
*
* @param bool $dvds
*
* @return Classifications
*/
public function setDvds($dvds)
{
$this->dvds = $dvds;
return $this;
}
/**
* Get dvds.
*
* @return bool
*/
public function getDvds()
{
return $this->dvds;
}
/**
* Set playlists.
*
* @param bool $playlists
*
* @return Classifications
*/
public function setPlaylists($playlists)
{
$this->playlists = $playlists;
return $this;
}
/**
* Get playlists.
*
* @return bool
*/
public function getPlaylists()
{
return $this->playlists;
}
/**
* Set lagarce.
*
* @param bool $lagarce
*
* @return Classifications
*/
public function setLagarce($lagarce)
{
$this->lagarce = $lagarce;
return $this;
}
/**
* Get lagarce.
*
* @return bool
*/
public function getLagarce()
{
return $this->lagarce;
}
/**
* Set idgroupclassification.
*
* @param int|null $idgroupclassification
*
* @return Classifications
*/
public function setIdgroupclassification($idgroupclassification = null)
{
$this->idgroupclassification = $idgroupclassification;
return $this;
}
/**
* Get idgroupclassification.
*
* @return int|null
*/
public function getIdgroupclassification()
{
return $this->idgroupclassification;
}
/**
* Set isPublic.
*
* @param bool|null $isPublic
*
* @return Classifications
*/
public function setIsPublic($isPublic = null)
{
$this->isPublic = $isPublic;
return $this;
}
/**
* Get isPublic.
*
* @return bool|null
*/
public function getIsPublic()
{
return $this->isPublic;
}
/**
* Set range.
*
* @param int|null $range
*
* @return Classifications
*/
public function setRange($range = null)
{
$this->range = $range;
return $this;
}
/**
* Get range.
*
* @return int|null
*/
public function getRange()
{
return $this->range;
}
/**
* Add module.
*
* @param \Modules $module
*
* @return Classifications
*/
public function addModule(Modules $module)
{
$this->module[] = $module;
return $this;
}
/**
* Remove module.
*
* @param \Modules $module
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeModule(Modules $module)
{
return $this->module->removeElement($module);
}
/**
* Get module.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getModule()
{
return $this->module;
}
/**
* Add idcontact.
*
* @param \Contacts $idcontact
*
* @return Classifications
*/
public function addIdcontact(Contacts $idcontact)
{
$this->idcontact[] = $idcontact;
return $this;
}
/**
* Remove idcontact.
*
* @param \Contacts $idcontact
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdcontact(Contacts $idcontact)
{
return $this->idcontact->removeElement($idcontact);
}
/**
* Get idcontact.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdcontact()
{
return $this->idcontact;
}
/**
* Add idcontent.
*
* @param \Contents $idcontent
*
* @return Classifications
*/
public function addIdcontent(Contents $idcontent)
{
$this->idcontent[] = $idcontent;
return $this;
}
/**
* Remove idcontent.
*
* @param \Contents $idcontent
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdcontent(Contents $idcontent)
{
return $this->idcontent->removeElement($idcontent);
}
/**
* Get idcontent.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdcontent()
{
return $this->idcontent;
}
/**
* Add idfile.
*
* @param \Files $idfile
*
* @return Classifications
*/
public function addIdfile(Files $idfile)
{
$this->idfile[] = $idfile;
return $this;
}
/**
* Remove idfile.
*
* @param \Files $idfile
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdfile(Files $idfile)
{
return $this->idfile->removeElement($idfile);
}
/**
* Get idfile.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdfile()
{
return $this->idfile;
}
/**
* Add idmultimedia.
*
* @param \Multimedias $idmultimedia
*
* @return Classifications
*/
public function addIdmultimedia(Multimedias $idmultimedia)
{
$this->idmultimedia[] = $idmultimedia;
return $this;
}
/**
* Remove idmultimedia.
*
* @param \Multimedias $idmultimedia
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdmultimedia(Multimedias $idmultimedia)
{
return $this->idmultimedia->removeElement($idmultimedia);
}
/**
* Get idmultimedia.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdmultimedia()
{
return $this->idmultimedia;
}
/**
* Add idperson.
*
* @param \Persons $idperson
*
* @return Classifications
*/
public function addIdperson(Persons $idperson)
{
$this->idperson[] = $idperson;
return $this;
}
/**
* Remove idperson.
*
* @param \Persons $idperson
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdperson(Persons $idperson)
{
return $this->idperson->removeElement($idperson);
}
/**
* Get idperson.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdperson()
{
return $this->idperson;
}
/**
* Add idplaylist.
*
* @param \Playlists $idplaylist
*
* @return Classifications
*/
public function addIdplaylist(Playlists $idplaylist)
{
$this->idplaylist[] = $idplaylist;
return $this;
}
/**
* Remove idplaylist.
*
* @param \Playlists $idplaylist
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdplaylist(Playlists $idplaylist)
{
return $this->idplaylist->removeElement($idplaylist);
}
/**
* Get idplaylist.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdplaylist()
{
return $this->idplaylist;
}
/**
* Add idspectacle.
*
* @param \Spectacles $idspectacle
*
* @return Classifications
*/
public function addIdspectacle(Spectacles $idspectacle)
{
$this->idspectacle[] = $idspectacle;
return $this;
}
/**
* Remove idspectacle.
*
* @param \Spectacles $idspectacle
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdspectacle(Spectacles $idspectacle)
{
return $this->idspectacle->removeElement($idspectacle);
}
/**
* Get idspectacle.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdspectacle()
{
return $this->idspectacle;
}
/**
* Add idtemplate.
*
* @param \Templates $idtemplate
*
* @return Classifications
*/
public function addIdtemplate(Templates $idtemplate)
{
$this->idtemplate[] = $idtemplate;
return $this;
}
/**
* Remove idtemplate.
*
* @param \Templates $idtemplate
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdtemplate(Templates $idtemplate)
{
return $this->idtemplate->removeElement($idtemplate);
}
/**
* Get idtemplate.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdtemplate()
{
return $this->idtemplate;
}
/**
* Add idtext.
*
* @param \Texts $idtext
*
* @return Classifications
*/
public function addIdtext(Texts $idtext)
{
$this->idtext[] = $idtext;
return $this;
}
/**
* Remove idtext.
*
* @param \Texts $idtext
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdtext(Texts $idtext)
{
return $this->idtext->removeElement($idtext);
}
/**
* Get idtext.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdtext()
{
return $this->idtext;
}
public function __toString() {
return $this->classification;
}
}