<?php
namespace TheatreCore\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Templates
*
* @ORM\Table(name="templates", indexes={@ORM\Index(name="fichier", columns={"fichier"})})
* @ORM\Entity(repositoryClass="TheatreCore\Repository\TemplatesRepository")
*/
class Templates
{
/**
* @var int
*
* @ORM\Column(name="idtemplate", type="integer", nullable=false, options={"unsigned"=true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $idtemplate;
/**
* @var string
*
* @ORM\Column(name="fichier", type="string", length=255, nullable=false)
*/
private $fichier;
/**
* @var string|null
*
* @ORM\Column(name="description", type="text", length=65535, nullable=true)
*/
private $description;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Contents", mappedBy="idtemplate")
*/
private $idcontent;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Classifications", inversedBy="idtemplate")
* @ORM\JoinTable(name="template_classification",
* joinColumns={
* @ORM\JoinColumn(name="idtemplate", referencedColumnName="idtemplate")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="idclassification", referencedColumnName="idclassification")
* }
* )
*/
private $idclassification;
/**
* Constructor
*/
public function __construct()
{
$this->idcontent = new \Doctrine\Common\Collections\ArrayCollection();
$this->idclassification = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get idtemplate.
*
* @return int
*/
public function getIdtemplate()
{
return $this->idtemplate;
}
/**
* Set fichier.
*
* @param string $fichier
*
* @return Templates
*/
public function setFichier($fichier)
{
$this->fichier = $fichier;
return $this;
}
/**
* Get fichier.
*
* @return string
*/
public function getFichier()
{
return $this->fichier;
}
/**
* Set description.
*
* @param string|null $description
*
* @return Templates
*/
public function setDescription($description = null)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string|null
*/
public function getDescription()
{
return $this->description;
}
/**
* Add idcontent.
*
* @param \Contents $idcontent
*
* @return Templates
*/
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 idclassification.
*
* @param \Classifications $idclassification
*
* @return Templates
*/
public function addIdclassification(Classifications $idclassification)
{
$this->idclassification[] = $idclassification;
return $this;
}
/**
* Remove idclassification.
*
* @param \Classifications $idclassification
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdclassification(Classifications $idclassification)
{
return $this->idclassification->removeElement($idclassification);
}
/**
* Get idclassification.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdclassification()
{
return $this->idclassification;
}
public function __toString()
{
return (string)$this->getFichier();
}
}