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.

38 lines
698B

  1. <?php
  2. namespace Lc\SovBundle\Model\Site;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
  6. /**
  7. * @ORM\MappedSuperclass()
  8. */
  9. abstract class NewsModel extends AbstractFullEntity implements NewsInterface
  10. {
  11. /**
  12. * @ORM\Column(type="datetime")
  13. * @Gedmo\Timestampable(on="create")
  14. */
  15. protected $date;
  16. public function __toString()
  17. {
  18. return $this->getTitle();
  19. }
  20. public function getDate(): ?\DateTimeInterface
  21. {
  22. return $this->date;
  23. }
  24. public function setDate(\DateTimeInterface $date): self
  25. {
  26. $this->date = $date;
  27. return $this;
  28. }
  29. }