You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3KB

  1. <?php
  2. namespace Lc\SovBundle\Doctrine\Extension;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\SovBundle\Model\File\FileModel;
  5. use Lc\SovBundle\Model\File\FileInterface;
  6. trait OpenGraphTrait
  7. {
  8. /**
  9. * @ORM\Column(type="string", nullable=true)
  10. */
  11. protected $openGraphTitle;
  12. /**
  13. * @ORM\Column(type="text", nullable=true)
  14. */
  15. protected $openGraphDescription;
  16. /**
  17. * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"})
  18. */
  19. protected $openGraphImage;
  20. public function getOpenGraphTitle(): ?string
  21. {
  22. return $this->openGraphTitle;
  23. }
  24. public function setOpenGraphTitle(string $openGraphTitle): self
  25. {
  26. $this->openGraphTitle = $openGraphTitle;
  27. return $this;
  28. }
  29. public function getOpenGraphDescription(): ?string
  30. {
  31. return $this->openGraphDescription;
  32. }
  33. public function setOpenGraphDescription(?string $openGraphDescription): self
  34. {
  35. $this->openGraphDescription = $openGraphDescription;
  36. return $this;
  37. }
  38. public function getOpenGraphImage(): ?FileInterface
  39. {
  40. return $this->openGraphImage;
  41. }
  42. public function setOpenGraphImage(?FileInterface $openGraphImage): self
  43. {
  44. $this->openGraphImage = $openGraphImage;
  45. return $this;
  46. }
  47. }