54 lines
1.2KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use App\Entity\Hub;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Lc\ShopBundle\Context\FilterMerchantInterface;
  6. /**
  7. * @ORM\MappedSuperclass()
  8. */
  9. abstract class Page extends AbstractDocumentEntity implements FilterMerchantInterface
  10. {
  11. /**
  12. * @ORM\Column(type="text", nullable=true)
  13. */
  14. protected $content;
  15. /**
  16. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="pages")
  17. * @ORM\JoinColumn(nullable=false)
  18. */
  19. protected $merchant;
  20. public function __toString()
  21. {
  22. return $this->getTitle() ;
  23. }
  24. public function getContent(): ?string
  25. {
  26. return $this->content;
  27. }
  28. public function setContent(?string $content): self
  29. {
  30. $this->content = $content;
  31. return $this;
  32. }
  33. public function getMerchant(): ?Hub
  34. {
  35. return $this->merchant;
  36. }
  37. public function setMerchant(?Hub $merchant): self
  38. {
  39. $this->merchant = $merchant;
  40. return $this;
  41. }
  42. }