src/Entity/InteractionTemplate.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InteractionTemplateRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=InteractionTemplateRepository::class)
  9. */
  10. class InteractionTemplate
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\Column(type="string", length=255)
  20. */
  21. private $name;
  22. /**
  23. * @ORM\Column(type="string", length=255, nullable=true)
  24. */
  25. private $type;
  26. /**
  27. * @ORM\Column(type="text")
  28. */
  29. private $content;
  30. /**
  31. * @ORM\OneToOne(targetEntity=EmailInfo::class, mappedBy="interactionTemplate", cascade={"persist", "remove"})
  32. */
  33. private $emailInfo;
  34. public function __construct()
  35. {
  36. }
  37. public function getId(): ?int
  38. {
  39. return $this->id;
  40. }
  41. public function getName(): ?string
  42. {
  43. return $this->name;
  44. }
  45. public function setName(string $name): self
  46. {
  47. $this->name = $name;
  48. return $this;
  49. }
  50. public function getType(): ?string
  51. {
  52. return $this->type;
  53. }
  54. public function setType(?string $type): self
  55. {
  56. $this->type = $type;
  57. return $this;
  58. }
  59. public function getContent(): ?string
  60. {
  61. return $this->content;
  62. }
  63. public function setContent(string $content): self
  64. {
  65. $this->content = $content;
  66. return $this;
  67. }
  68. public function getEmailInfo(): ?EmailInfo
  69. {
  70. return $this->emailInfo;
  71. }
  72. public function setEmailInfo(?EmailInfo $emailInfo): self
  73. {
  74. // unset the owning side of the relation if necessary
  75. if ($emailInfo === null && $this->emailInfo !== null) {
  76. $this->emailInfo->setInteractionTemplate(null);
  77. }
  78. // set the owning side of the relation if necessary
  79. if ($emailInfo !== null && $emailInfo->getInteractionTemplate() !== $this) {
  80. $emailInfo->setInteractionTemplate($this);
  81. }
  82. $this->emailInfo = $emailInfo;
  83. return $this;
  84. }
  85. }