src/Entity/Template.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TemplateRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassTemplateRepository::class)]
  9. class Template
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $label null;
  17.     #[ORM\OneToMany(mappedBy'template'targetEntityDocument::class)]
  18.     private Collection $documents;
  19.     #[ORM\Column(typeTypes::TEXT)]
  20.     private ?string $entete null;
  21.     #[ORM\Column(typeTypes::TEXT)]
  22.     private ?string $pied null;
  23.     #[ORM\Column(typeTypes::TEXT)]
  24.     private ?string $css null;
  25.     #[ORM\Column(typeTypes::TEXT)]
  26.     private ?string $css_compile null;
  27.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  28.     private ?\DateTimeInterface $date_creation null;
  29.     #[ORM\Column(typeTypes::INTEGERoptions: ['default' => 1])]
  30.     private ?int $etat 1;
  31.     #[ORM\Column(typeTypes::BOOLEANoptions: ['default' => false])]
  32.     private bool $par_defaut false;
  33.     public function __construct()
  34.     {
  35.         $this->documents = new ArrayCollection();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getLabel(): ?string
  42.     {
  43.         return $this->label;
  44.     }
  45.     public function setLabel(string $label): static
  46.     {
  47.         $this->label $label;
  48.         return $this;
  49.     }
  50.     /**
  51.      * @return Collection<int, Document>
  52.      */
  53.     public function getDocuments(): Collection
  54.     {
  55.         return $this->documents;
  56.     }
  57.     public function addDocument(Document $document): static
  58.     {
  59.         if (!$this->documents->contains($document)) {
  60.             $this->documents->add($document);
  61.             $document->setTemplate($this);
  62.         }
  63.         return $this;
  64.     }
  65.     public function removeDocument(Document $document): static
  66.     {
  67.         if ($this->documents->removeElement($document)) {
  68.             // set the owning side to null (unless already changed)
  69.             if ($document->getTemplate() === $this) {
  70.                 $document->setTemplate(null);
  71.             }
  72.         }
  73.         return $this;
  74.     }
  75.     public function getEntete(): ?string
  76.     {
  77.         return $this->entete;
  78.     }
  79.     public function setEntete(string $entete): static
  80.     {
  81.         $this->entete $entete;
  82.         return $this;
  83.     }
  84.     public function getPied(): ?string
  85.     {
  86.         return $this->pied;
  87.     }
  88.     public function setPied(string $pied): static
  89.     {
  90.         $this->pied $pied;
  91.         return $this;
  92.     }
  93.     public function getCss(): ?string
  94.     {
  95.         return $this->css;
  96.     }
  97.     public function setCss(string $css): static
  98.     {
  99.         $this->css $css;
  100.         return $this;
  101.     }
  102.     public function getCssCompile(): ?string
  103.     {
  104.         return $this->css_compile;
  105.     }
  106.     public function setCssCompile(string $css_compile): static
  107.     {
  108.         $this->css_compile $css_compile;
  109.         return $this;
  110.     }
  111.     public function getDateCreation(): ?\DateTimeInterface
  112.     {
  113.         return $this->date_creation;
  114.     }
  115.     public function setDateCreation(?\DateTimeInterface $date_creation): static
  116.     {
  117.         $this->date_creation $date_creation;
  118.         return $this;
  119.     }
  120.     public function getEtat(): ?int
  121.     {
  122.         return $this->etat;
  123.     }
  124.     public function setEtat(int $etat): static
  125.     {
  126.         $this->etat $etat;
  127.         return $this;
  128.     }
  129.     public function isParDefaut(): bool
  130.     {
  131.         return $this->par_defaut;
  132.     }
  133.     public function setParDefaut(bool $par_defaut): static
  134.     {
  135.         $this->par_defaut $par_defaut;
  136.         return $this;
  137.     }
  138. }