src/Entity/Actualites/ActualitesCat.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Actualites;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * ActualitesCat
  8.  *
  9.  * @ORM\Table(name="actualites_cat", indexes={@ORM\Index(name="actif", columns={"actif"}), @ORM\Index(name="langue", columns={"langue"})})
  10.  * @ORM\Entity(repositoryClass="App\Repository\Actualites\ActualitesCatRepository")
  11.  */
  12. class ActualitesCat
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="titre_url", type="string", length=255, nullable=false)
  26.      */
  27.     private $titreUrl '';
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="titre", type="string", length=255, nullable=false)
  32.      */
  33.     private $titre '';
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="texte", type="text", length=65535, nullable=false)
  38.      */
  39.     private $texte '';
  40.     /**
  41.      * @var int
  42.      *
  43.      * @ORM\Column(name="ordre", type="integer", nullable=false, options={"default":0})
  44.      */
  45.     private $ordre 0;
  46.     /**
  47.      * @var bool
  48.      *
  49.      * @ORM\Column(name="actif", type="boolean", nullable=false, options={"default":0})
  50.      */
  51.     private $actif 0;
  52.     /**
  53.      * @var string
  54.      *
  55.      * @ORM\Column(name="langue", type="string", length=3, nullable=false)
  56.      */
  57.     private $langue '';
  58.     /**
  59.      * @var int
  60.      *
  61.      * @ORM\Column(name="largeur_grand", type="integer", nullable=false, options={"default":0})
  62.      */
  63.     private $largeurGrand 0;
  64.     /**
  65.      * @var int
  66.      *
  67.      * @ORM\Column(name="largeur_petit", type="integer", nullable=false, options={"default":0})
  68.      */
  69.     private $largeurPetit 0;
  70.     /**
  71.      * @ORM\OneToMany(targetEntity="App\Entity\Actualites\Actualites", mappedBy="idCat1")
  72.      */
  73.     private $actualites;
  74.     public function __construct()
  75.     {
  76.         $this->actualites = new ArrayCollection();
  77.     }
  78.     public function __toString()
  79.     {
  80.         return $this->getTitre();
  81.     }
  82.     public function getId(): ?int
  83.     {
  84.         return $this->id;
  85.     }
  86.     public function getTitreUrl(): ?string
  87.     {
  88.         return $this->titreUrl;
  89.     }
  90.     public function setTitreUrl(string $titreUrl): self
  91.     {
  92.         $this->titreUrl $titreUrl;
  93.         return $this;
  94.     }
  95.     public function getTitre(): ?string
  96.     {
  97.         return $this->titre;
  98.     }
  99.     public function setTitre(string $titre): self
  100.     {
  101.         $this->titre $titre;
  102.         return $this;
  103.     }
  104.     public function getTexte(): ?string
  105.     {
  106.         return $this->texte;
  107.     }
  108.     public function setTexte(string $texte): self
  109.     {
  110.         $this->texte $texte;
  111.         return $this;
  112.     }
  113.     public function getOrdre(): ?int
  114.     {
  115.         return $this->ordre;
  116.     }
  117.     public function setOrdre(int $ordre): self
  118.     {
  119.         $this->ordre $ordre;
  120.         return $this;
  121.     }
  122.     public function getActif(): ?bool
  123.     {
  124.         return $this->actif;
  125.     }
  126.     public function setActif(bool $actif): self
  127.     {
  128.         $this->actif $actif;
  129.         return $this;
  130.     }
  131.     public function getLangue(): ?string
  132.     {
  133.         return $this->langue;
  134.     }
  135.     public function setLangue(string $langue): self
  136.     {
  137.         $this->langue $langue;
  138.         return $this;
  139.     }
  140.     public function getLargeurGrand(): ?int
  141.     {
  142.         return $this->largeurGrand;
  143.     }
  144.     public function setLargeurGrand(int $largeurGrand): self
  145.     {
  146.         $this->largeurGrand $largeurGrand;
  147.         return $this;
  148.     }
  149.     public function getLargeurPetit(): ?int
  150.     {
  151.         return $this->largeurPetit;
  152.     }
  153.     public function setLargeurPetit(int $largeurPetit): self
  154.     {
  155.         $this->largeurPetit $largeurPetit;
  156.         return $this;
  157.     }
  158.     /**
  159.      * @return Collection|Actualites[]
  160.      */
  161.     public function getActualites(): Collection
  162.     {
  163.         return $this->actualites;
  164.     }
  165.     public function addActualite(Actualites $actualite): self
  166.     {
  167.         if (!$this->actualites->contains($actualite)) {
  168.             $this->actualites[] = $actualite;
  169.             $actualite->setIdCat1($this);
  170.         }
  171.         return $this;
  172.     }
  173.     public function removeActualite(Actualites $actualite): self
  174.     {
  175.         if ($this->actualites->contains($actualite)) {
  176.             $this->actualites->removeElement($actualite);
  177.             // set the owning side to null (unless already changed)
  178.             if ($actualite->getIdCat1() === $this) {
  179.                 $actualite->setIdCat1(null);
  180.             }
  181.         }
  182.         return $this;
  183.     }
  184. }