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.

Page.php 1.2KB

4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. }