src/Entity/Templates.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\ActiveTrait;
  4. use App\Entity\Traits\DeleteTrait;
  5. use App\Entity\Traits\ImageUploadTrait;
  6. use App\Entity\Traits\TitleAndContentTrait;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. /**
  12. * Templates.
  13. *
  14. * @Gedmo\Loggable
  15. */
  16. #[ORM\Entity(repositoryClass: \App\Repository\PageRepository::class)]
  17. #[ORM\Table(name: 'templates')]
  18. class Templates
  19. {
  20. use TitleAndContentTrait;
  21. use ActiveTrait;
  22. use DeleteTrait;
  23. use ImageUploadTrait;
  24. #[ORM\Column(name: 'id', type: 'integer')]
  25. #[ORM\Id]
  26. #[ORM\GeneratedValue(strategy: 'AUTO')]
  27. private int $id;
  28. #[ORM\Column(name: 'description', type: 'string', length: 255)]
  29. private ?string $description = null;
  30. #[ORM\Column(name: 'templatefile', type: 'string', length: 255)]
  31. private ?string $templatefile = null;
  32. #[ORM\Column(name: 'number_of_html', type: 'integer', nullable: true)]
  33. private ?int $numberOfHtml = null;
  34. #[ORM\Column(name: 'number_of_components', type: 'integer', nullable: true)]
  35. private ?int $numberOfComponents = null;
  36. #[ORM\OneToMany(targetEntity: Page::class, mappedBy: 'template')]
  37. private Collection $pagetemplate;
  38. #[ORM\Column(name: 'inherited_bundle_name', type: 'string', length: 255, nullable: true)]
  39. private ?string $inherited_bundle_name = null;
  40. public function __construct()
  41. {
  42. $this->pagetemplate = new ArrayCollection();
  43. }
  44. public function getId(): int
  45. {
  46. return $this->id;
  47. }
  48. public function setDescription($description): self
  49. {
  50. $this->description = $description;
  51. return $this;
  52. }
  53. public function getDescription(): ?string
  54. {
  55. return $this->description;
  56. }
  57. public function setTemplatefile($templatefile): self
  58. {
  59. $this->templatefile = $templatefile;
  60. return $this;
  61. }
  62. public function getTemplatefile(): ?string
  63. {
  64. return $this->templatefile;
  65. }
  66. public function setNumberOfHtml($numberOfHtml): self
  67. {
  68. $this->numberOfHtml = $numberOfHtml;
  69. return $this;
  70. }
  71. public function getNumberOfHtml(): ?int
  72. {
  73. return $this->numberOfHtml;
  74. }
  75. public function setNumberOfComponents($numberOfComponents): self
  76. {
  77. $this->numberOfComponents = $numberOfComponents;
  78. return $this;
  79. }
  80. public function getNumberOfComponents(): ?int
  81. {
  82. return $this->numberOfComponents;
  83. }
  84. public function addPagetemplate(Page $pagetemplate): self
  85. {
  86. $this->pagetemplate[] = $pagetemplate;
  87. return $this;
  88. }
  89. public function removePagetemplate(Page $pagetemplate): self
  90. {
  91. $this->pagetemplate->removeElement($pagetemplate);
  92. return $this;
  93. }
  94. public function getPagetemplate(): ArrayCollection
  95. {
  96. return $this->pagetemplate;
  97. }
  98. public function setInheritedBundleName($inherited_bundle_name): self
  99. {
  100. $this->inherited_bundle_name = $inherited_bundle_name;
  101. return $this;
  102. }
  103. public function getInheritedBundleName(): ?string
  104. {
  105. return $this->inherited_bundle_name;
  106. }
  107. }