src/Entity/BibliothequePedagogique.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Symfony\Component\HttpFoundation\File\File;
  4. use App\Repository\BibliothequePedagogiqueRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. /**
  9.  * @ORM\Entity(repositoryClass=BibliothequePedagogiqueRepository::class)
  10.  * @ORM\Table(name="bibliotheque_pedagogique", schema="bdnf", options={"comment":"Contient les documents de la bibliothèque pédagogique "})
  11.  */
  12. class BibliothequePedagogique
  13. {
  14.     public function __construct()
  15.     {
  16.     }
  17.     public function __toString(){
  18.         return "Document ".$this->getId();
  19.     }
  20.     public function toArray()
  21.     {
  22.         return [
  23.             'id' => $this->getId(),
  24.             'category' => $this->getCategory(),
  25.             'descriptionFr' => $this->getDescriptionFr(),
  26.             'descriptionEn' => $this->getDescriptionEn(),
  27.             'documentFr' => $this->getDocumentFr(),
  28.             'documentEn' => $this->getDocumentEn(),
  29.         ];
  30.     }
  31.     /**
  32.      * @ORM\Id
  33.      * @ORM\GeneratedValue
  34.      * @ORM\Column(type="integer" , options={"comment":"Identifiant unique du document"})
  35.      */
  36.     private $id;
  37.     /**
  38.      * @ORM\Column(type="string", nullable=true , options={"comment":"Catégorie du document"})
  39.      */
  40.     private $category;
  41.     /**
  42.      * @ORM\Column(type="boolean" , options={"comment":"Document actif ou non"})
  43.      */
  44.     private $active true;
  45.     /**
  46.      * @ORM\Column(type="string", nullable=true, options={"comment":"Description du document en français"})
  47.      */
  48.     private $descriptionFr;
  49.     /**
  50.      * @ORM\Column(type="string", nullable=true, options={"comment":"Description du document en anglais"})
  51.      */
  52.     private $descriptionEn;
  53.     /**
  54.      * @ORM\Column(type="string", nullable=true, options={"comment":"document en français"})
  55.      */
  56.     private $documentFr;
  57.     /**
  58.      * @Vich\UploadableField(mapping="documentFr", fileNameProperty="documentFr")
  59.      * @var File
  60.      */
  61.     private $fileFr;
  62.     /**
  63.      * @ORM\Column(type="string", nullable=true, options={"comment":"document en anglais"})
  64.      */
  65.     private $documentEn;
  66.     /**
  67.      * @Vich\UploadableField(mapping="documentEn", fileNameProperty="documentEn")
  68.      * @var File
  69.      */
  70.     private $fileEn;
  71.     /**
  72.      * @return mixed
  73.      */
  74.     public function getId()
  75.     {
  76.         return $this->id;
  77.     }
  78.     /**
  79.      * @param mixed $id
  80.      */
  81.     public function setId($id): void
  82.     {
  83.         $this->id $id;
  84.     }
  85.     /**
  86.      * @return mixed
  87.      */
  88.     public function getActive()
  89.     {
  90.         return $this->active;
  91.     }
  92.     /**
  93.      * @param mixed $active
  94.      */
  95.     public function setActive($active): void
  96.     {
  97.         $this->active $active;
  98.     }
  99.     /**
  100.      * @return mixed
  101.      */
  102.     public function getDescriptionFr()
  103.     {
  104.         return $this->descriptionFr;
  105.     }
  106.     /**
  107.      * @param mixed $descriptionFr
  108.      */
  109.     public function setDescriptionFr($descriptionFr): void
  110.     {
  111.         $this->descriptionFr $descriptionFr;
  112.     }
  113.     /**
  114.      * @return mixed
  115.      */
  116.     public function getDescriptionEn()
  117.     {
  118.         return $this->descriptionEn;
  119.     }
  120.     /**
  121.      * @param mixed $descriptionEn
  122.      */
  123.     public function setDescriptionEn($descriptionEn): void
  124.     {
  125.         $this->descriptionEn $descriptionEn;
  126.     }
  127.     /**
  128.      * @return mixed
  129.      */
  130.     public function getDocumentFr()
  131.     {
  132.         return $this->documentFr;
  133.     }
  134.     /**
  135.      * @param mixed $documentFr
  136.      */
  137.     public function setDocumentFr($documentFr): void
  138.     {
  139.         $this->documentFr $documentFr;
  140.     }
  141.     /**
  142.      * @return File
  143.      */
  144.     public function getFileFr(): File
  145.     {
  146.         return $this->fileFr;
  147.     }
  148.     /**
  149.      * @param File $fileFr
  150.      */
  151.     public function setFileFr(File $fileFr): void
  152.     {
  153.         $this->fileFr $fileFr;
  154.     }
  155.     /**
  156.      * @return mixed
  157.      */
  158.     public function getDocumentEn()
  159.     {
  160.         return $this->documentEn;
  161.     }
  162.     /**
  163.      * @param mixed $documentEn
  164.      */
  165.     public function setDocumentEn($documentEn): void
  166.     {
  167.         $this->documentEn $documentEn;
  168.     }
  169.     /**
  170.      * @return File
  171.      */
  172.     public function getFileEn(): File
  173.     {
  174.         return $this->fileEn;
  175.     }
  176.     /**
  177.      * @param File $fileEn
  178.      */
  179.     public function setFileEn(File $fileEn): void
  180.     {
  181.         $this->fileEn $fileEn;
  182.     }
  183.     /**
  184.      * @return mixed
  185.      */
  186.     public function getCategory()
  187.     {
  188.         return $this->category;
  189.     }
  190.     /**
  191.      * @param mixed $category
  192.      */
  193.     public function setCategory($category): void
  194.     {
  195.         $this->category $category;
  196.     }
  197. }