123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?php
- namespace Entity;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Doctrine\ORM\Mapping as ORM;
- //use APY\DataGridBundle\Grid\Mapping as GRID;
- /**
- * EntityPages
- *
- * @ORM\@Table(name="pages")
- * @ORM\Entity(repositoryClass="Entity\Repository\PagesRepository")
- * @ORM\HasLifecycleCallbacks()
- * @GRID\Source(columns="id, title")
- */
- class Pages
- {
- /**
- * @var integer
- *
- * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="IDENTITY")
- */
- private $id;
- /**
- * @var string
- *
- * @ORM\Column(name="title", type="string", length=255)
- */
- private $title;
- /**
- * @var string
- * \@Gedmo\Slug(fields={"title"})
- * @ORM\Column(name="slug", type="string", length=255)
- */
- private $slug;
- /**
- * @var string
- *
- * @ORM\Column(name="content", type="text", precision=0, scale=0, nullable=false, unique=false)
- */
- private $content;
- /**
- * @var \DateTime
- * @ORM\Column(type="datetime")
- */
- private $created;
- /**
- * @var \DateTime
- * @ORM\Column(type="datetime")
- */
- private $updated;
- public function __construct()
- {
- $this->setCreated();
- $this->setUpdated();
- }
- /**
- * @preUpdate
- */
- public function setUpdated()
- {
- $this->updated = new \DateTime();
- }
- public function setCreated()
- {
- $this->created = new \DateTime();
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set title
- *
- * @param string $title
- * @return EntityPages
- */
- public function setTitle($title)
- {
- $this->title = $title;
- return $this;
- }
- /**
- * Get title
- *
- * @return string
- */
- public function getTitle()
- {
- return $this->title;
- }
- /**
- * Get slug
- *
- * @return string
- */
- public function getSlug()
- {
- return $this->slug;
- }
- public function setSlug($slug)
- {
- $this->slug = $slug;
- return $this;
- }
- /**
- * Set content
- *
- * @param string $content
- * @return EntityPages
- */
- public function setContent($content)
- {
- $this->content = $content;
- return $this;
- }
- /**
- * Get content
- *
- * @return string
- */
- public function getContent()
- {
- return $this->content;
- }
- }
|