vendor/theatre/core/src/Entity/Templates.php line 13

Open in your IDE?
  1. <?php
  2. namespace TheatreCore\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Templates
  6.  *
  7.  * @ORM\Table(name="templates", indexes={@ORM\Index(name="fichier", columns={"fichier"})})
  8.  * @ORM\Entity(repositoryClass="TheatreCore\Repository\TemplatesRepository")
  9.  */
  10. class Templates
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="idtemplate", type="integer", nullable=false, options={"unsigned"=true})
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $idtemplate;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="fichier", type="string", length=255, nullable=false)
  24.      */
  25.     private $fichier;
  26.     /**
  27.      * @var string|null
  28.      *
  29.      * @ORM\Column(name="description", type="text", length=65535, nullable=true)
  30.      */
  31.     private $description;
  32.     /**
  33.      * @var \Doctrine\Common\Collections\Collection
  34.      *
  35.      * @ORM\ManyToMany(targetEntity="Contents", mappedBy="idtemplate")
  36.      */
  37.     private $idcontent;
  38.     /**
  39.      * @var \Doctrine\Common\Collections\Collection
  40.      *
  41.      * @ORM\ManyToMany(targetEntity="Classifications", inversedBy="idtemplate")
  42.      * @ORM\JoinTable(name="template_classification",
  43.      *   joinColumns={
  44.      *     @ORM\JoinColumn(name="idtemplate", referencedColumnName="idtemplate")
  45.      *   },
  46.      *   inverseJoinColumns={
  47.      *     @ORM\JoinColumn(name="idclassification", referencedColumnName="idclassification")
  48.      *   }
  49.      * )
  50.      */
  51.     private $idclassification;
  52.     /**
  53.      * Constructor
  54.      */
  55.     public function __construct()
  56.     {
  57.         $this->idcontent = new \Doctrine\Common\Collections\ArrayCollection();
  58.         $this->idclassification = new \Doctrine\Common\Collections\ArrayCollection();
  59.     }
  60.     /**
  61.      * Get idtemplate.
  62.      *
  63.      * @return int
  64.      */
  65.     public function getIdtemplate()
  66.     {
  67.         return $this->idtemplate;
  68.     }
  69.     /**
  70.      * Set fichier.
  71.      *
  72.      * @param string $fichier
  73.      *
  74.      * @return Templates
  75.      */
  76.     public function setFichier($fichier)
  77.     {
  78.         $this->fichier $fichier;
  79.         return $this;
  80.     }
  81.     /**
  82.      * Get fichier.
  83.      *
  84.      * @return string
  85.      */
  86.     public function getFichier()
  87.     {
  88.         return $this->fichier;
  89.     }
  90.     /**
  91.      * Set description.
  92.      *
  93.      * @param string|null $description
  94.      *
  95.      * @return Templates
  96.      */
  97.     public function setDescription($description null)
  98.     {
  99.         $this->description $description;
  100.         return $this;
  101.     }
  102.     /**
  103.      * Get description.
  104.      *
  105.      * @return string|null
  106.      */
  107.     public function getDescription()
  108.     {
  109.         return $this->description;
  110.     }
  111.     /**
  112.      * Add idcontent.
  113.      *
  114.      * @param \Contents $idcontent
  115.      *
  116.      * @return Templates
  117.      */
  118.     public function addIdcontent(Contents $idcontent)
  119.     {
  120.         $this->idcontent[] = $idcontent;
  121.         return $this;
  122.     }
  123.     /**
  124.      * Remove idcontent.
  125.      *
  126.      * @param \Contents $idcontent
  127.      *
  128.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  129.      */
  130.     public function removeIdcontent(Contents $idcontent)
  131.     {
  132.         return $this->idcontent->removeElement($idcontent);
  133.     }
  134.     /**
  135.      * Get idcontent.
  136.      *
  137.      * @return \Doctrine\Common\Collections\Collection
  138.      */
  139.     public function getIdcontent()
  140.     {
  141.         return $this->idcontent;
  142.     }
  143.     /**
  144.      * Add idclassification.
  145.      *
  146.      * @param \Classifications $idclassification
  147.      *
  148.      * @return Templates
  149.      */
  150.     public function addIdclassification(Classifications $idclassification)
  151.     {
  152.         $this->idclassification[] = $idclassification;
  153.         return $this;
  154.     }
  155.     /**
  156.      * Remove idclassification.
  157.      *
  158.      * @param \Classifications $idclassification
  159.      *
  160.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  161.      */
  162.     public function removeIdclassification(Classifications $idclassification)
  163.     {
  164.         return $this->idclassification->removeElement($idclassification);
  165.     }
  166.     /**
  167.      * Get idclassification.
  168.      *
  169.      * @return \Doctrine\Common\Collections\Collection
  170.      */
  171.     public function getIdclassification()
  172.     {
  173.         return $this->idclassification;
  174.     }
  175.     public function __toString()
  176.     {
  177.         return (string)$this->getFichier();
  178.     }
  179. }