No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

76 líneas
1.6KB

  1. <?php
  2. namespace Lc\SovBundle\Model\Site;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
  5. use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
  6. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  7. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  8. use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
  9. /**
  10. * @ORM\MappedSuperclass()
  11. */
  12. abstract class PageModel extends AbstractFullEntity implements PageInterface
  13. {
  14. /**
  15. * @ORM\Column(type="text", nullable=true)
  16. */
  17. protected $content;
  18. /**
  19. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="pages")
  20. * @ORM\JoinColumn(nullable=false)
  21. */
  22. protected $merchant;
  23. /**
  24. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="pages")
  25. */
  26. protected $section;
  27. public function __toString()
  28. {
  29. return $this->getTitle();
  30. }
  31. public function getContent(): ?string
  32. {
  33. return $this->content;
  34. }
  35. public function setContent(?string $content): self
  36. {
  37. $this->content = $content;
  38. return $this;
  39. }
  40. public function getMerchant(): ?MerchantInterface
  41. {
  42. return $this->merchant;
  43. }
  44. public function setMerchant(?MerchantInterface $merchant): self
  45. {
  46. $this->merchant = $merchant;
  47. return $this;
  48. }
  49. public function getSection(): ?SectionInterface
  50. {
  51. return $this->section;
  52. }
  53. public function setSection(?SectionInterface $section): self
  54. {
  55. $this->section = $section;
  56. return $this;
  57. }
  58. }