123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?php
- namespace Timestampable\Fixture;
- use Gedmo\Timestampable\Timestampable;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity
- */
- class TitledArticle implements Timestampable
- {
- /**
- * @ORM\Id
- * @ORM\GeneratedValue
- * @ORM\Column(type="integer")
- */
- private $id;
- /**
- * @ORM\Column(name="title", type="string", length=128)
- */
- private $title;
- /**
- * @ORM\Column(name="text", type="string", length=128)
- */
- private $text;
- /**
- * @ORM\Column(name="state", type="string", length=128)
- */
- private $state;
- /**
- * @var \DateTime $updated
- *
- * @ORM\Column(name="chtext", type="datetime", nullable=true)
- * @Gedmo\Timestampable(on="change", field="text")
- */
- private $chtext;
- /**
- * @var \DateTime $chtitle
- *
- * @ORM\Column(name="chtitle", type="datetime", nullable=true)
- * @Gedmo\Timestampable(on="change", field="title")
- */
- private $chtitle;
- /**
- * @var \DateTime $closed
- *
- * @ORM\Column(name="closed", type="datetime", nullable=true)
- * @Gedmo\Timestampable(on="change", field="state", value={"Published", "Closed"})
- */
- private $closed;
- /**
- * @param \DateTime $chtext
- */
- public function setChtext($chtext)
- {
- $this->chtext = $chtext;
- }
- /**
- * @return \DateTime
- */
- public function getChtext()
- {
- return $this->chtext;
- }
- /**
- * @param \DateTime $chtitle
- */
- public function setChtitle($chtitle)
- {
- $this->chtitle = $chtitle;
- }
- /**
- * @return \DateTime
- */
- public function getChtitle()
- {
- return $this->chtitle;
- }
- /**
- * @param \DateTime $closed
- */
- public function setClosed($closed)
- {
- $this->closed = $closed;
- }
- /**
- * @return \DateTime
- */
- public function getClosed()
- {
- return $this->closed;
- }
- public function setId($id)
- {
- $this->id = $id;
- }
- public function getId()
- {
- return $this->id;
- }
- public function setText($text)
- {
- $this->text = $text;
- }
- public function getText()
- {
- return $this->text;
- }
- public function setTitle($title)
- {
- $this->title = $title;
- }
- public function getTitle()
- {
- return $this->title;
- }
- public function setState($state)
- {
- $this->state = $state;
- }
- public function getState()
- {
- return $this->state;
- }
- }
|