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.

32 satır
580B

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