src/Entity/ModuleText.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * ModuleText
  6. *
  7. * @ORM\Table(name="module_texts")
  8. * @ORM\Entity
  9. */
  10. class ModuleText {
  11. /**
  12. * @var integer
  13. *
  14. * @ORM\Column(name="id", type="integer")
  15. * @ORM\Id
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private $id;
  19. /**
  20. * @ORM\OneToOne(targetEntity="ModuleHook")
  21. * @ORM\JoinColumn(name="module_hook_id", referencedColumnName="id")
  22. */
  23. private $moduleHook;
  24. /**
  25. * @var string
  26. *
  27. * @ORM\Column(name="title_fr", type="string", length=255, nullable=true)
  28. */
  29. private $titleFr;
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(name="content_fr", type="text", nullable=true)
  34. */
  35. private $contentFr;
  36. /**
  37. * @var string
  38. *
  39. * @ORM\Column(name="title_en", type="string", length=255, nullable=true)
  40. */
  41. private $titleEn;
  42. /**
  43. * @var string
  44. *
  45. * @ORM\Column(name="content_en", type="text", nullable=true)
  46. */
  47. private $contentEn;
  48. public function getId() {
  49. return $this->id;
  50. }
  51. public function getModuleHook() {
  52. return $this->moduleHook;
  53. }
  54. public function getTitleFr(): ?string {
  55. return $this->titleFr;
  56. }
  57. public function getContentFr(): ?string {
  58. return $this->contentFr;
  59. }
  60. public function getTitleEn(): ?string {
  61. return $this->titleEn;
  62. }
  63. public function getContentEn(): ?string {
  64. return $this->contentEn;
  65. }
  66. public function setId($id): void {
  67. $this->id = $id;
  68. }
  69. public function setModuleHook($moduleHook): void {
  70. $this->moduleHook = $moduleHook;
  71. }
  72. public function setTitleFr(?string $titleFr): void {
  73. $this->titleFr = $titleFr;
  74. }
  75. public function setContentFr(?string $contentFr): void {
  76. $this->contentFr = $contentFr;
  77. }
  78. public function setTitleEn(?string $titleEn): void {
  79. $this->titleEn = $titleEn;
  80. }
  81. public function setContentEn(?string $contentEn): void {
  82. $this->contentEn = $contentEn;
  83. }
  84. /**
  85. * Chargement des paramètres du module
  86. */
  87. public function getData(ModuleHook $module_hooked) {
  88. $data = array();
  89. $data['titleFr'] = $this->getTitleFr();
  90. $data['titleEn'] = $this->getTitleEn();
  91. $data['contentFr'] = $this->getContentFr();
  92. $data['contentEn'] = $this->getContentEn();
  93. return $data;
  94. }
  95. }