Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

PageModel.php 1.6KB

il y a 3 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. }