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.

92 satır
1.9KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Lc\ShopBundle\Context\SortableInterface;
  6. use Lc\ShopBundle\Context\StatusInterface;
  7. use Lc\ShopBundle\Model\AbstractEntity;
  8. /**
  9. * @ORM\MappedSuperclass
  10. */
  11. abstract class AbstractDocumentEntity extends AbstractEntity implements StatusInterface, SortableInterface
  12. {
  13. use SortableTrait;
  14. use StatusTrait;
  15. /**
  16. * @ORM\Column(type="string", length=255)
  17. */
  18. protected $title;
  19. /**
  20. * @ORM\Column(type="string", length=255)
  21. * @Gedmo\Slug(fields={"title"})
  22. */
  23. protected $slug;
  24. /**
  25. * @ORM\Column(type="text", nullable=true)
  26. */
  27. protected $description;
  28. /**
  29. * @ORM\Column(type="string", length=255, nullable=true)
  30. */
  31. protected $image;
  32. public function getTitle(): ?string
  33. {
  34. return $this->title;
  35. }
  36. public function setTitle(string $title): self
  37. {
  38. $this->title = $title;
  39. return $this;
  40. }
  41. public function getSlug(): ?string
  42. {
  43. return $this->slug;
  44. }
  45. public function setSlug(string $slug): self
  46. {
  47. $this->slug = $slug;
  48. return $this;
  49. }
  50. public function getDescription(): ?string
  51. {
  52. return $this->description;
  53. }
  54. public function setDescription(?string $description): self
  55. {
  56. $this->description = $description;
  57. return $this;
  58. }
  59. public function getImage(): ?string
  60. {
  61. return $this->image;
  62. }
  63. public function setImage(?string $image): self
  64. {
  65. $this->image = $image;
  66. return $this;
  67. }
  68. }