src/Entity/Traductions/Langue.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Traductions;
  3. use App\Entity\Utilisateur\Utilisateur;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * Langue
  10.  *
  11.  * @ORM\Table("traduction__langue")
  12.  * @ORM\Entity(repositoryClass="App\Repository\Traductions\LangueRepository")
  13.  */
  14. class Langue
  15. {
  16.     /**
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="langue")
  24.      * @ORM\JoinColumn(nullable=true)
  25.      */
  26.     private $utilisateur;
  27.  
  28.     /**
  29.      * @ORM\Column(name="date", type="datetime", nullable=true)
  30.      */
  31.     private $date;
  32.     /**
  33.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  34.      * @Assert\NotBlank(message="LibellĂ© obligatoire")     
  35.      */
  36.     private $libelle;
  37.     /**
  38.      * @ORM\Column(name="statut", type="boolean", nullable=true)
  39.      */
  40.     private $statut;
  41.     /**
  42.      * @ORM\Column(name="iso", type="string", length=255, nullable=true)
  43.      */
  44.     private $iso;
  45.     public function __construct()
  46.     {
  47.         $this->date     = new Datetime();
  48.         $this->statut   true;
  49.     }
  50.     public function __toString() {
  51.         return $this->libelle;
  52.     }
  53.     public function getId(): int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function setDate(?DateTime $date): Langue
  58.     {
  59.         $this->date $date;
  60.         return $this;
  61.     }
  62.     public function getDate(): ?DateTime
  63.     {
  64.         return $this->date;
  65.     }
  66.     public function setLibelle(?string $libelle): Langue
  67.     {
  68.         $this->libelle $libelle;
  69.         return $this;
  70.     }
  71.     public function getLibelle(): ?string
  72.     {
  73.         return $this->libelle;
  74.     }
  75.     public function setStatut(?bool $statut): Langue
  76.     {
  77.         $this->statut $statut;
  78.         return $this;
  79.     }
  80.     public function getStatut(): ?bool
  81.     {
  82.         return $this->statut;
  83.     }
  84.     public function setIso(?string $iso): Langue
  85.     {
  86.         $this->iso $iso;
  87.         return $this;
  88.     }
  89.     public function getIso(): ?string
  90.     {
  91.         return $this->iso;
  92.     }
  93.     public function setUtilisateur(?Utilisateur $utilisateur): Langue
  94.     {
  95.         $this->utilisateur $utilisateur;
  96.         return $this;
  97.     }
  98.     public function getUtilisateur(): ?Utilisateur
  99.     {
  100.         return $this->utilisateur;
  101.     }
  102.    }