Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

53 lines
1.3KB

  1. <?php
  2. namespace Lc\CaracoleBundle\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\Model\Site\PageModel as SovPageModel;
  9. /**
  10. * @ORM\MappedSuperclass()
  11. */
  12. abstract class PageModel extends SovPageModel implements FilterMerchantInterface, FilterSectionInterface
  13. {
  14. /**
  15. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface")
  16. * @ORM\JoinColumn(nullable=false)
  17. */
  18. protected $merchant;
  19. /**
  20. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="pages")
  21. * @ORM\JoinColumn(nullable=true)
  22. */
  23. protected $section;
  24. public function getMerchant(): ?MerchantInterface
  25. {
  26. return $this->merchant;
  27. }
  28. public function setMerchant(?MerchantInterface $merchant): self
  29. {
  30. $this->merchant = $merchant;
  31. return $this;
  32. }
  33. public function getSection(): ?SectionInterface
  34. {
  35. return $this->section;
  36. }
  37. public function setSection(SectionInterface $section): self
  38. {
  39. $this->section = $section;
  40. return $this;
  41. }
  42. }