Added login and posting functionality

Signed-off-by: Gergely Polonkai (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely Polonkai (W00d5t0ck)
2012-09-04 17:21:04 +02:00
parent 5bcd9f079b
commit 04d408aee0
12 changed files with 277 additions and 18 deletions

View File

@@ -4,6 +4,7 @@ namespace GergelyPolonkai\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as GedmoORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Description of Post
@@ -36,6 +37,7 @@ class Post
* @var string $title
*
* @ORM\Column(type="string", length=100)
* @Assert\NotBlank()
*/
private $title;
@@ -51,6 +53,7 @@ class Post
* @var string $content
*
* @ORM\Column(type="text", nullable=false)
* @Assert\NotBlank()
*/
private $content;
@@ -160,4 +163,30 @@ class Post
{
return $this->createdAt;
}
}
/**
* Set slug
*
* @param string $slug
* @return Post
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Set createdAt
*
* @param \DateTime $createdAt
* @return Post
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
}