src/Entity/TransactionalEmailTemplate.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TransactionalEmailTemplateRepository;
  4. use App\Traits\DateTrait;
  5. use DateTime;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. /**
  10. * @ORM\Entity(repositoryClass=TransactionalEmailTemplateRepository::class)
  11. *
  12. * @Vich\Uploadable
  13. */
  14. class TransactionalEmailTemplate
  15. {
  16. /**
  17. * @ORM\Id
  18. * @ORM\GeneratedValue
  19. * @ORM\Column(type="integer")
  20. */
  21. private ?int $id = NULL;
  22. /**
  23. * @ORM\Column(type="text", nullable=true )
  24. */
  25. private ?string $footerContent = NULL;
  26. /**
  27. * @ORM\Column(type="string", length=9)
  28. */
  29. private ?string $footerTextColor = NULL;
  30. /**
  31. * @ORM\Column(type="string", length=9)
  32. */
  33. private ?string $footerBackgroundColor = NULL;
  34. /**
  35. * @ORM\Column(type="string", length=255, nullable=true)
  36. */
  37. private ?string $headerPicture = NULL;
  38. /**
  39. * Vich Uploader
  40. *
  41. * @Vich\UploadableField(mapping="transactional_email_images", fileNameProperty="headerPicture")
  42. */
  43. private ?File $transactionalEmailHeaderFile = NULL;
  44. /**
  45. * @ORM\Column(type="string", length=255, nullable=true)
  46. */
  47. private ?string $footerPicture = NULL;
  48. /**
  49. * @ORM\Column(type="text", nullable=true )
  50. */
  51. private ?string $footerPictureWidth = NULL;
  52. /**
  53. * Vich Uploader
  54. *
  55. * @Vich\UploadableField(mapping="transactional_email_images", fileNameProperty="footerPicture")
  56. */
  57. private ?File $transactionalEmailFooterFile = NULL;
  58. use DateTrait;
  59. public function getId(): ?int
  60. {
  61. return $this->id;
  62. }
  63. public function getFooterContent(): ?string
  64. {
  65. return $this->footerContent;
  66. }
  67. public function setFooterContent( ?string $footerContent ): self
  68. {
  69. $this->footerContent = $footerContent;
  70. return $this;
  71. }
  72. public function getFooterTextColor(): ?string
  73. {
  74. return $this->footerTextColor;
  75. }
  76. public function setFooterTextColor( string $footerTextColor ): self
  77. {
  78. $this->footerTextColor = $footerTextColor;
  79. return $this;
  80. }
  81. public function getFooterBackgroundColor(): ?string
  82. {
  83. return $this->footerBackgroundColor;
  84. }
  85. public function setFooterBackgroundColor( string $footerBackgroundColor ): self
  86. {
  87. $this->footerBackgroundColor = $footerBackgroundColor;
  88. return $this;
  89. }
  90. public function getHeaderPicture(): ?string
  91. {
  92. return $this->headerPicture;
  93. }
  94. public function setHeaderPicture( ?string $headerPicture ): self
  95. {
  96. $this->headerPicture = $headerPicture;
  97. return $this;
  98. }
  99. public function getFooterPicture(): ?string
  100. {
  101. return $this->footerPicture;
  102. }
  103. public function setFooterPicture( ?string $footerPicture ): self
  104. {
  105. $this->footerPicture = $footerPicture;
  106. return $this;
  107. }
  108. public function getFooterPictureWidth(): ?string
  109. {
  110. return $this->footerPictureWidth;
  111. }
  112. public function setFooterPictureWidth( ?string $footerPictureWidth ): self
  113. {
  114. $this->footerPictureWidth = $footerPictureWidth;
  115. return $this;
  116. }
  117. public function getTransactionalEmailHeaderFile(): ?File
  118. {
  119. return $this->transactionalEmailHeaderFile;
  120. }
  121. public function setTransactionalEmailHeaderFile( File $transactionalEmailHeaderFile ): TransactionalEmailTemplate
  122. {
  123. $this->transactionalEmailHeaderFile = $transactionalEmailHeaderFile;
  124. $this->updatedAt = new DateTime();
  125. return $this;
  126. }
  127. public function getTransactionalEmailFooterFile(): ?File
  128. {
  129. return $this->transactionalEmailFooterFile;
  130. }
  131. public function setTransactionalEmailFooterFile( File $transactionalEmailFooterFile ): TransactionalEmailTemplate
  132. {
  133. $this->transactionalEmailFooterFile = $transactionalEmailFooterFile;
  134. $this->updatedAt = new DateTime();
  135. return $this;
  136. }
  137. }