Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

OpenGraphTrait.php 1.3KB

pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. }