src/Entity/Utilisateur/Droit.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Utilisateur;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use App\Annotations\SecuredEntity;
  8. /**
  9.  * Droit
  10.  *
  11.  * @ORM\Table("utilisateur__droit")
  12.  * @ORM\Entity(repositoryClass="App\Repository\Utilisateur\DroitRepository")
  13.  * @SecuredEntity(name="Droits Utilisateur", group="REGLAGES")
  14.  */
  15. class Droit
  16. {
  17.     /**
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\TypeUtilisateur", inversedBy="droits")
  25.      */
  26.     private $typesUtilisateur;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Droit")
  29.      */
  30.     private $parent;
  31.     
  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="entite", type="string", length=255, nullable=true)
  39.      */
  40.     private $entite;
  41.     
  42.     /**
  43.      * @ORM\Column(name="position", type="integer", nullable=true)
  44.      */
  45.     private $position;
  46.     /**
  47.      * @ORM\Column(name="voir", type="boolean", nullable=true)
  48.      */
  49.     private $voir;
  50.     /**
  51.      * @ORM\Column(name="ajouter", type="boolean", nullable=true)
  52.      */
  53.     private $ajouter;
  54.     /**
  55.      * @ORM\Column(name="modifier", type="boolean", nullable=true)
  56.      */
  57.     private $modifier;
  58.     /**
  59.      * @ORM\Column(name="supprimer", type="boolean", nullable=true)
  60.      */
  61.     private $supprimer;
  62.     
  63.     /**
  64.      * @ORM\Column(name="exporter", type="boolean", nullable=true)
  65.      */
  66.     private $exporter
  67.     
  68.     /**
  69.      * @ORM\Column(name="statut", type="boolean", nullable=true)
  70.      */
  71.     private $statut;
  72.     /**
  73.      * @ORM\Column(name="date", type="datetime")
  74.      */
  75.     private $date;
  76.     public function __construct()
  77.                       {
  78.                           $this->date = new Datetime();
  79.                       }
  80.     public function getId(): int
  81.     {
  82.         return $this->id;
  83.     }
  84.     public function setEntite(?string $entite): Droit
  85.     {
  86.         $this->entite $entite;
  87.         return $this;
  88.     }
  89.     public function getEntite(): ?string
  90.     {
  91.         return $this->entite;
  92.     }
  93.     public function setVoir(?bool $voir): Droit
  94.     {
  95.         $this->voir $voir;
  96.         return $this;
  97.     }
  98.     public function getVoir(): ?bool
  99.     {
  100.         return $this->voir;
  101.     }
  102.     public function setAjouter(?bool $ajouter): Droit
  103.     {
  104.         $this->ajouter $ajouter;
  105.         return $this;
  106.     }
  107.     public function getAjouter(): ?bool
  108.     {
  109.         return $this->ajouter;
  110.     }
  111.     public function setModifier(?bool $modifier): Droit
  112.     {
  113.         $this->modifier $modifier;
  114.         return $this;
  115.     }
  116.     public function getModifier(): ?bool
  117.     {
  118.         return $this->modifier;
  119.     }
  120.     public function setSupprimer(?bool $supprimer): Droit
  121.     {
  122.         $this->supprimer $supprimer;
  123.         return $this;
  124.     }
  125.     public function getSupprimer(): ?bool
  126.     {
  127.         return $this->supprimer;
  128.     }
  129.     public function setDate(DateTime $date): Droit
  130.     {
  131.         $this->date $date;
  132.         return $this;
  133.     }
  134.     public function getDate(): DateTime
  135.     {
  136.         return $this->date;
  137.     }
  138.     public function setTypesUtilisateur(?TypeUtilisateur $typesUtilisateur): Droit
  139.     {
  140.         $this->typesUtilisateur $typesUtilisateur;
  141.         return $this;
  142.     }
  143.     public function getTypesUtilisateur(): ?TypeUtilisateur
  144.     {
  145.         return $this->typesUtilisateur;
  146.     }
  147.     public function setExporter(?bool $exporter): Droit
  148.     {
  149.         $this->exporter $exporter;
  150.         return $this;
  151.     }
  152.     public function getExporter(): ?bool
  153.     {
  154.         return $this->exporter;
  155.     }
  156.     public function setStatut(?bool $statut): Droit
  157.     {
  158.         $this->statut $statut;
  159.         return $this;
  160.     }
  161.     public function getStatut(): ?bool
  162.     {
  163.         return $this->statut;
  164.     }
  165.     public function setLibelle(?string $libelle): Droit
  166.     {
  167.         $this->libelle $libelle;
  168.         return $this;
  169.     }
  170.     public function getLibelle(): ?string
  171.     {
  172.         return $this->libelle;
  173.     }
  174.     public function setPosition(?int $position): Droit
  175.     {
  176.         $this->position $position;
  177.         return $this;
  178.     }
  179.     public function getPosition(): ?int
  180.     {
  181.         return $this->position;
  182.     }
  183.     public function setParent(?Droit $parent)
  184.     {
  185.         $this->parent $parent;
  186.         return $this;
  187.     }
  188.     public function getParent(): ?Droit
  189.     {
  190.         return $this->parent;
  191.     }
  192.     public function isVoir(): ?bool
  193.     {
  194.         return $this->voir;
  195.     }
  196.     public function isAjouter(): ?bool
  197.     {
  198.         return $this->ajouter;
  199.     }
  200.     public function isModifier(): ?bool
  201.     {
  202.         return $this->modifier;
  203.     }
  204.     public function isSupprimer(): ?bool
  205.     {
  206.         return $this->supprimer;
  207.     }
  208.     public function isExporter(): ?bool
  209.     {
  210.         return $this->exporter;
  211.     }
  212.     public function isStatut(): ?bool
  213.     {
  214.         return $this->statut;
  215.     }
  216. }