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.     public function __construct()
  30.     {
  31.         $this->documents = new ArrayCollection();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getLabel(): ?string
  38.     {
  39.         return $this->label;
  40.     }
  41.     public function setLabel(string $label): static
  42.     {
  43.         $this->label $label;
  44.         return $this;
  45.     }
  46.     /**
  47.      * @return Collection<int, Document>
  48.      */
  49.     public function getDocuments(): Collection
  50.     {
  51.         return $this->documents;
  52.     }
  53.     public function addDocument(Document $document): static
  54.     {
  55.         if (!$this->documents->contains($document)) {
  56.             $this->documents->add($document);
  57.             $document->setTemplate($this);
  58.         }
  59.         return $this;
  60.     }
  61.     public function removeDocument(Document $document): static
  62.     {
  63.         if ($this->documents->removeElement($document)) {
  64.             // set the owning side to null (unless already changed)
  65.             if ($document->getTemplate() === $this) {
  66.                 $document->setTemplate(null);
  67.             }
  68.         }
  69.         return $this;
  70.     }
  71.     public function getEntete(): ?string
  72.     {
  73.         return $this->entete;
  74.     }
  75.     public function setEntete(string $entete): static
  76.     {
  77.         $this->entete $entete;
  78.         return $this;
  79.     }
  80.     public function getPied(): ?string
  81.     {
  82.         return $this->pied;
  83.     }
  84.     public function setPied(string $pied): static
  85.     {
  86.         $this->pied $pied;
  87.         return $this;
  88.     }
  89.     public function getCss(): ?string
  90.     {
  91.         return $this->css;
  92.     }
  93.     public function setCss(string $css): static
  94.     {
  95.         $this->css $css;
  96.         return $this;
  97.     }
  98.     public function getCssCompile(): ?string
  99.     {
  100.         return $this->css_compile;
  101.     }
  102.     public function setCssCompile(string $css_compile): static
  103.     {
  104.         $this->css_compile $css_compile;
  105.         return $this;
  106.     }
  107.     public function getDateCreation(): ?\DateTimeInterface
  108.     {
  109.         return $this->date_creation;
  110.     }
  111.     public function setDateCreation(?\DateTimeInterface $date_creation): static
  112.     {
  113.         $this->date_creation $date_creation;
  114.         return $this;
  115.     }
  116. }