src/Entity/Actualites/Actualites.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Actualites;
  3. use App\Entity\Ecoles\Ecoles;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * Actualites
  9.  *
  10.  * @ORM\Table(name="actualites", indexes={@ORM\Index(name="actif", columns={"actif"}), @ORM\Index(name="langue", columns={"langue"})})
  11.  * @ORM\Entity(repositoryClass="App\Repository\Actualites\ActualitesRepository")
  12.  */
  13. class Actualites
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned":true})
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="IDENTITY")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Actualites\ActualitesCat", inversedBy="actualites")
  25.      * @ORM\JoinColumn(name="id_cat1", referencedColumnName="id", nullable=true)
  26.      */
  27.     private $idCat1;
  28.     /**
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\Actualites\ActualitesCat", inversedBy="actualites")
  31.      * @ORM\JoinColumn(name="id_cat2", referencedColumnName="id", nullable=true)
  32.      */
  33.     private $idCat2;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="titre_url", type="string", length=255, nullable=false)
  38.      */
  39.     private $titreUrl '';
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="titre", type="string", length=255, nullable=false)
  44.      */
  45.     private $titre '';
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="texte_court", type="text", length=65535, nullable=false)
  50.      */
  51.     private $texteCourt '';
  52.     /**
  53.      * @var string
  54.      *
  55.      * @ORM\Column(name="texte", type="text", length=65535, nullable=false)
  56.      */
  57.     private $texte '';
  58.     /**
  59.      * @var string
  60.      *
  61.      * @ORM\Column(name="mots_cles", type="string", length=500, nullable=false)
  62.      */
  63.     private $motsCles '';
  64.     /**
  65.      * @var string
  66.      *
  67.      * @ORM\Column(name="auteur", type="string", length=100, nullable=false)
  68.      */
  69.     private $auteur '';
  70.     /**
  71.      * @var string
  72.      *
  73.      * @ORM\Column(name="auteur_lien", type="string", length=255, nullable=false)
  74.      */
  75.     private $auteurLien '';
  76.     /**
  77.      * @var \DateTime
  78.      *
  79.      * @ORM\Column(name="date", type="datetime", nullable=true)
  80.      */
  81.     private $date;
  82.     /**
  83.      * @var \DateTime
  84.      *
  85.      * @ORM\Column(name="date_debut", type="datetime", nullable=true)
  86.      */
  87.     private $dateDebut;
  88.     /**
  89.      * @var \DateTime
  90.      *
  91.      * @ORM\Column(name="date_fin", type="datetime", nullable=true)
  92.      */
  93.     private $dateFin;
  94.     /**
  95.      * @var int
  96.      *
  97.      * @ORM\Column(name="ordre", type="integer", nullable=false, options={"default":0})
  98.      */
  99.     private $ordre 0;
  100.     /**
  101.      * @var bool
  102.      *
  103.      * @ORM\Column(name="actif", type="boolean", nullable=false, options={"default":0})
  104.      */
  105.     private $actif 0;
  106.     /**
  107.      * @var int
  108.      *
  109.      * @ORM\Column(name="lectures", type="integer", nullable=false, options={"default":0})
  110.      */
  111.     private $lectures 0;
  112.     /**
  113.      * @var string
  114.      *
  115.      * @ORM\Column(name="langue", type="string", length=3, nullable=false)
  116.      */
  117.     private $langue '';
  118.     /**
  119.      * @var bool
  120.      *
  121.      * @ORM\Column(name="une", type="boolean", nullable=false, options={"default":0})
  122.      */
  123.     private $une 0;
  124.     /**
  125.      * @var string
  126.      *
  127.      * @ORM\Column(name="photo", type="string", length=255, nullable=false)
  128.      */
  129.     private $photo '';
  130.     /**
  131.      * @var string
  132.      *
  133.      * @ORM\Column(name="actualites_associees", type="string", length=100, nullable=false)
  134.      */
  135.     private $actualitesAssociees '';
  136.     /**
  137.      * @ORM\OneToMany(targetEntity="App\Entity\Actualites\ActualitesCom", mappedBy="actualite", cascade={"persist", "remove"}, orphanRemoval=true)
  138.      */
  139.     private $commentaires;
  140.     /**
  141.      * @ORM\ManyToOne(targetEntity=Ecoles::class, inversedBy="actualites")
  142.      */
  143.     private $ecole;
  144.     /**
  145.      * Actualites constructor.
  146.      */
  147.     public function __construct()
  148.     {
  149.         $this->date = new \DateTime();
  150.         $this->commentaires = new ArrayCollection();
  151.     }
  152.     public function getId(): ?int
  153.     {
  154.         return $this->id;
  155.     }
  156.     public function getTitreUrl(): ?string
  157.     {
  158.         return $this->titreUrl;
  159.     }
  160.     public function setTitreUrl(string $titreUrl): self
  161.     {
  162.         $this->titreUrl $titreUrl;
  163.         return $this;
  164.     }
  165.     public function getTitre(): ?string
  166.     {
  167.         return $this->titre;
  168.     }
  169.     public function setTitre(string $titre): self
  170.     {
  171.         $this->titre $titre;
  172.         return $this;
  173.     }
  174.     public function getTexteCourt(): ?string
  175.     {
  176.         return $this->texteCourt;
  177.     }
  178.     public function setTexteCourt(string $texteCourt): self
  179.     {
  180.         $this->texteCourt $texteCourt;
  181.         return $this;
  182.     }
  183.     public function getTexte(): ?string
  184.     {
  185.         return $this->texte;
  186.     }
  187.     public function setTexte(string $texte): self
  188.     {
  189.         $this->texte $texte;
  190.         return $this;
  191.     }
  192.     public function getMotsCles(): ?string
  193.     {
  194.         return $this->motsCles;
  195.     }
  196.     public function setMotsCles(string $motsCles): self
  197.     {
  198.         $this->motsCles $motsCles;
  199.         return $this;
  200.     }
  201.     public function getAuteur(): ?string
  202.     {
  203.         return $this->auteur;
  204.     }
  205.     public function setAuteur(string $auteur): self
  206.     {
  207.         $this->auteur $auteur;
  208.         return $this;
  209.     }
  210.     public function getAuteurLien(): ?string
  211.     {
  212.         return $this->auteurLien;
  213.     }
  214.     public function setAuteurLien(string $auteurLien): self
  215.     {
  216.         $this->auteurLien $auteurLien;
  217.         return $this;
  218.     }
  219.     public function getDate(): ?\DateTimeInterface
  220.     {
  221.         return $this->date;
  222.     }
  223.     public function setDate(\DateTimeInterface $date): self
  224.     {
  225.         $this->date $date;
  226.         return $this;
  227.     }
  228.     public function getDateDebut(): ?\DateTimeInterface
  229.     {
  230.         return $this->dateDebut;
  231.     }
  232.     public function setDateDebut(? \DateTimeInterface $dateDebut): self
  233.     {
  234.         $this->dateDebut $dateDebut;
  235.         return $this;
  236.     }
  237.     public function getDateFin(): ?\DateTimeInterface
  238.     {
  239.         return $this->dateFin;
  240.     }
  241.     public function setDateFin(? \DateTimeInterface $dateFin): self
  242.     {
  243.         $this->dateFin $dateFin;
  244.         return $this;
  245.     }
  246.     public function getOrdre(): ?int
  247.     {
  248.         return $this->ordre;
  249.     }
  250.     public function setOrdre(int $ordre): self
  251.     {
  252.         $this->ordre $ordre;
  253.         return $this;
  254.     }
  255.     public function getActif(): ?bool
  256.     {
  257.         return $this->actif;
  258.     }
  259.     public function setActif(bool $actif): self
  260.     {
  261.         $this->actif $actif;
  262.         return $this;
  263.     }
  264.     public function getLectures(): ?int
  265.     {
  266.         return $this->lectures;
  267.     }
  268.     public function setLectures(int $lectures): self
  269.     {
  270.         $this->lectures $lectures;
  271.         return $this;
  272.     }
  273.     public function getLangue(): ?string
  274.     {
  275.         return $this->langue;
  276.     }
  277.     public function setLangue(string $langue): self
  278.     {
  279.         $this->langue $langue;
  280.         return $this;
  281.     }
  282.     public function getUne(): ?bool
  283.     {
  284.         return $this->une;
  285.     }
  286.     public function setUne(bool $une): self
  287.     {
  288.         $this->une $une;
  289.         return $this;
  290.     }
  291.     public function getPhoto(): ?string
  292.     {
  293.         return $this->photo;
  294.     }
  295.     public function setPhoto(string $photo): self
  296.     {
  297.         $this->photo $photo;
  298.         return $this;
  299.     }
  300.     public function getActualitesAssociees(): ?string
  301.     {
  302.         return $this->actualitesAssociees;
  303.     }
  304.     public function setActualitesAssociees(string $actualitesAssociees): self
  305.     {
  306.         $this->actualitesAssociees $actualitesAssociees;
  307.         return $this;
  308.     }
  309.     public function getIdCat1(): ?ActualitesCat
  310.     {
  311.         return $this->idCat1;
  312.     }
  313.     public function setIdCat1(?ActualitesCat $idCat1): self
  314.     {
  315.         $this->idCat1 $idCat1;
  316.         return $this;
  317.     }
  318.     public function getIdCat2(): ?ActualitesCat
  319.     {
  320.         return $this->idCat2;
  321.     }
  322.     public function setIdCat2(?ActualitesCat $idCat2): self
  323.     {
  324.         $this->idCat2 $idCat2;
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return Collection|ActualitesCom[]
  329.      */
  330.     public function getCommentaires(): Collection
  331.     {
  332.         return $this->commentaires;
  333.     }
  334.     public function addCommentaire(ActualitesCom $commentaire): self
  335.     {
  336.         if (!$this->commentaires->contains($commentaire)) {
  337.             $this->commentaires[] = $commentaire;
  338.             $commentaire->setActualite($this);
  339.         }
  340.         return $this;
  341.     }
  342.     public function removeCommentaire(ActualitesCom $commentaire): self
  343.     {
  344.         if ($this->commentaires->contains($commentaire)) {
  345.             $this->commentaires->removeElement($commentaire);
  346.             // set the owning side to null (unless already changed)
  347.             if ($commentaire->getActualite() === $this) {
  348.                 $commentaire->setActualite(null);
  349.             }
  350.         }
  351.         return $this;
  352.     }
  353.     public function getEcole(): ?Ecoles
  354.     {
  355.         return $this->ecole;
  356.     }
  357.     public function setEcole(?Ecoles $ecole): self
  358.     {
  359.         $this->ecole $ecole;
  360.         return $this;
  361.     }
  362. }