|
12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
-
- namespace Lc\SovBundle\Model\Site;
-
- use Doctrine\ORM\Mapping as ORM;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class NewsModel extends AbstractFullEntity implements NewsInterface
- {
-
- /**
- * @ORM\Column(type="datetime")
- * @Gedmo\Timestampable(on="create")
- */
- protected $date;
-
- public function __toString()
- {
- return $this->getTitle();
- }
-
- public function getDate(): ?\DateTimeInterface
- {
- return $this->date;
- }
-
- public function setDate(\DateTimeInterface $date): self
- {
- $this->date = $date;
-
- return $this;
- }
- }
|