src/CMSBundle/Entity/Translation/FaqTranslation.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\CMSBundle\Entity\Translation;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use PN\LocaleBundle\Entity\Language;
  5. use PN\LocaleBundle\Model\EditableTranslation;
  6. use PN\LocaleBundle\Model\TranslationEntity;
  7. ;
  8. /**
  9. * @ORM\Entity
  10. * @ORM\Table(name="faq_translations")
  11. */
  12. class FaqTranslation extends TranslationEntity implements EditableTranslation
  13. {
  14. /**
  15. * @ORM\Column(name="question", type="text", nullable=true)
  16. */
  17. private ?string $question = null;
  18. /**
  19. * @var string
  20. *
  21. * @ORM\Column(name="answer", type="text", nullable=true)
  22. */
  23. private ?string $answer = null;
  24. /**
  25. * @var
  26. * @ORM\Id
  27. * @ORM\ManyToOne(targetEntity="App\CMSBundle\Entity\Faq", inversedBy="translations")
  28. */
  29. protected $translatable;
  30. /**
  31. * @var Language
  32. * @ORM\Id
  33. * @ORM\ManyToOne(targetEntity="PN\LocaleBundle\Entity\Language")
  34. */
  35. protected $language;
  36. public function setQuestion(?string $question): self
  37. {
  38. $this->question = $question;
  39. return $this;
  40. }
  41. public function getQuestion(): ?string
  42. {
  43. return $this->question;
  44. }
  45. public function setAnswer(?string $answer): self
  46. {
  47. $this->answer = $answer;
  48. return $this;
  49. }
  50. public function getAnswer(): ?string
  51. {
  52. return $this->answer;
  53. }
  54. }