Moved everything under annotations.

Some review is still needed.
This commit is contained in:
Polonkai Gergely
2012-07-13 12:07:21 +02:00
parent 60b5eecbc8
commit 00190c3e37
41 changed files with 3264 additions and 2509 deletions

View File

@@ -4,294 +4,340 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
/**
* KekRozsak\FrontBundle\Entity\Article
* @ORM\Entity
* @ORM\Table(name="articles")
*/
class Article
{
/**
* @var integer $id
*/
private $id;
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer", name="id")
*/
private $id;
/**
* @var string $title
*/
private $title;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var string $slug
*/
private $slug;
/**
* @var string $title
* @ORM\Column(type="string", length=100, nullable=false)
*/
private $title;
/**
* @var text $text
*/
private $text;
/**
* Set title
*
* @param string $title
* @return Article
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @var string $source
*/
private $source;
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @var DateTime $created_at
*/
private $created_at;
/**
* @var string $slug
* @ORM\Column(type="string", length=100, nullable=false, unique=true)
*/
private $slug;
/**
* @var DateTime $updated_at
*/
private $updated_at;
/**
* Set slug
*
* @param string $slug
* @return Article
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* @var text $update_reason
*/
private $update_reason;
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $created_by;
/**
* @var text $text
* @ORM\Column(type="text", nullable=false)
*/
private $text;
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $updated_by;
/**
* Set text
*
* @param text $text
* @return Article
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return text
*/
public function getText()
{
return $this->text;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var string $source
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $source;
/**
* Set title
*
* @param string $title
* @return Article
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Set source
*
* @param string $source
* @return Article
*/
public function setSource($source)
{
$this->source = $source;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Get source
*
* @return string
*/
public function getSource()
{
return $this->source;
}
/**
* Set slug
*
* @param string $slug
* @return Article
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* @var DateTime $createdAt
* @ORM\Column(type="datetime", nullable=false, name="created_at")
*/
private $createdAt;
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set createdAt
*
* @param DateTime $createdAt
* @return Article
*/
public function setCreatedAt(\DateTime $createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Set text
*
* @param text $text
* @return Article
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get createdAt
*
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Get text
*
* @return text
*/
public function getText()
{
return $this->text;
}
/**
* @var User $createdBy
* @ORM\ManyToOne(targetEntity="User", inversedBy="articles")
* @ORM\JoinColumn(name="created_by_id", referencedColumnName="id")
*/
private $createdBy;
/**
* Set source
*
* @param string $source
* @return Article
*/
public function setSource($source)
{
$this->source = $source;
return $this;
}
/**
* Set createdBy
*
* @param User $createdBy
* @return Article
*/
public function setCreatedBy(User $createdBy = null)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get source
*
* @return string
*/
public function getSource()
{
return $this->source;
}
/**
* Get createdBy
*
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set created_at
*
* @param DateTime $createdAt
* @return Article
*/
public function setCreatedAt(\DateTime $createdAt)
{
$this->created_at = $createdAt;
return $this;
}
/**
* @var DateTime $updatedAt
* @ORM\Column(type="datetime", nullable=true, name="updated_at")
*/
private $updatedAt;
/**
* Get created_at
*
* @return DateTime
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* Set updatedAt
*
* @param DateTime $updatedAt
* @return Article
*/
public function setUpdatedAt(\DateTime $updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Set updated_at
*
* @param DateTime $updatedAt
* @return Article
*/
public function setUpdatedAt(\DateTime $updatedAt)
{
$this->updated_at = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Get updated_at
*
* @return DateTime
*/
public function getUpdatedAt()
{
return $this->updated_at;
}
/**
* @var User $updatedBy
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id", referencedColumnName="id")
*/
private $updatedBy;
/**
* Set update_reason
*
* @param text $updateReason
* @return Article
*/
public function setUpdateReason($updateReason)
{
$this->update_reason = $updateReason;
return $this;
}
/**
* Set updatedBy
*
* @param User $updatedBy
* @return Article
*/
public function setUpdatedBy(User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get update_reason
*
* @return text
*/
public function getUpdateReason()
{
return $this->update_reason;
}
/**
* Get updatedBy
*
* @return User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set created_by
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return Article
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy = null)
{
$this->created_by = $createdBy;
return $this;
}
/**
* @var text $updateReason
* @ORM\Column(type="text", nullable=true, name="update_reason")
*/
private $updateReason;
/**
* Get created_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->created_by;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return Article
*/
public function setUpdateReason($updateReason)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Set updated_by
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return Article
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updated_by = $updatedBy;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Get updated_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updated_by;
}
/**
* @var boolean $main_page
*/
private $main_page;
/**
* @var boolean $mainPage
* @ORM\Column(type="boolean", name="main_page", nullable=true)
*/
private $mainPage;
/**
* Set mainPage
*
* @param boolean $mainPage
* @return Article
*/
public function setMainPage($mainPage)
{
$this->mainPage = $mainPage;
return $this;
}
/**
* Set main_page
*
* @param boolean $mainPage
* @return Article
*/
public function setMainPage($mainPage)
{
$this->main_page = $mainPage;
return $this;
}
/**
* Get mainPage
*
* @return boolean
*/
public function getMainPage()
{
return $this->mainPage;
}
/**
* Get main_page
*
* @return boolean
*/
public function getMainPage()
{
return $this->main_page;
}
}
/**
* @var boolean $public
* @ORM\Column(type="boolean", nullable=false)
*/
private $public;
/**
* Set public
*
* @param boolean $public
* @return Article
*/
public function setPublic($public)
{
$this->public = $public;
return $this;
}
/**
* Get public
*
* @return boolean
*/
public function getPublic()
{
return $this->public;
}
}

View File

@@ -0,0 +1,286 @@
<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
/**
* KekRozsak\FrontBundle\Entity\Document
* @ORM\Entity
* @ORM\Table(name="documents")
*/
class Document
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var string $title
* @ORM\Column(type="string", length=150, nullable=false, unique=true)
*/
private $title;
/**
* Set title
*
* @param string $title
* @return Document
*/
public function setTitle(string $title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @var string $slug;
* @ORM\Column(type="string", length=150, nullable=false, unique=true)
*/
private $slug;
/**
* Set slug
*
* @param string $slug
* @return Document
*/
public function setSlug(string $slug)
{
$this->slug = $slug;
return $this;
}
/** Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* @var string $text
* @ORM\Column(type="text", nullable=false)
*/
private $text;
/**
* Set text
*
* @param string $text
* @return Document
*/
public function setText(string $text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
/**
* @var DateTime $createdAt
* @ORM\Column(type="datetime", name="created_at", nullable=false)
*/
private $createdAt;
/**
* Set createdAt
*
* @param DateTime $createdAt
* @return Document
*/
public function setCreatedAt(\DateTime $createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @var User $createdBy
* @ORM\ManyToOne(targetEntity="User", inversedBy="createdDocuments")
* @ORM\JoinColumn(name="created_by_id", referencedColumnName="id")
*/
private $createdBy;
/**
* Set createdBy
*
* @param User $createdBy
* @return Document
*/
public function setCreatedBy(User $createdBy)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* @var DateTime $updatedAt
* @ORM\Column(type="datetime", name="updated_at", nullable=true)
*/
private $updatedAt;
/**
* Set updatedAt
*
* @param DateTime $updatedAt
* @return Document
*/
public function setUpdatedAt(\DateTime $updatedAt = null)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* @var User $updatedBy
* @ORM\ManyToOne(targetEntity="User", inversedBy="updatedDocuments")
* @ORM\JoinColumn(name="updated_by_id", referencedColumnName="id")
*/
private $updatedBy;
/**
* Set updatedBy
*
* @param User $updatedBy
* @return Document
*/
public function setUpdatedBy(User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updatedBy
*
* @return User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* @var string $updateReason
* @ORM\Column(name="update_reason", type="text", nullable=true)
*/
private $updateReason;
/**
* Set updateReason
*
* @param string $updateReason
* @return Document
*/
public function setUpdateReason(string $updateReason = null)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Get updateReason
*
* @return string
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* @var Group $groups
* @ORM\ManyToMany(targetEntity="Group", mappedBy="documents", fetch="EXTRA_LAZY")
*/
private $groups;
/**
* Set groups
*
* @param Group $groups
* @return Document
*/
public function setGroups(Group $groups = null)
{
$this->groups = $groups;
return $this;
}
/**
* Get groups
*
* @return Group
*/
public function getGroups()
{
return $this->groups;
}
}

View File

@@ -4,217 +4,232 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
use KekRozsak\FrontBundle\Entity\ForumTopic;
use KekRozsak\FrontBundle\Entity\ForumTopicGroup;
/**
* KekRozsak\FrontBundle\Entity\ForumPost
* @ORM\Entity
* @ORM\Table(name="forum_posts")
*/
class ForumPost
{
/**
* @var integer $id
*/
private $id;
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var datetime $created_at
*/
private $created_at;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var datetime $updated_at
*/
private $updated_at;
/**
* @var datetime $createdAt
* @ORM\Column(type="datetime", name="created_at", nullable=false)
*/
private $createdAt;
/**
* @var string $update_reason
*/
private $update_reason;
/**
* Set createdAt
*
* @param DateTime $createdAt
* @return ForumPost
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @var text $text
*/
private $text;
/**
* Get createdAt
*
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $created_by;
/**
* @var User $createdBy
* @ORM\ManyToOne(targetEntity="User", inversedBy="forumPosts")
* @ORM\JoinColumn(name="created_by_id", referencedColumnName="id")
*/
private $createdBy;
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $updated_by;
/**
* Set createdBy
*
* @param User $createdBy
* @return ForumPost
*/
public function setCreatedBy(User $createdBy)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* @var KekRozsak\FrontBundle\Entity\ForumTopic
*/
private $topic;
/**
* Get createdBy
*
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* @var datetime $updatedAt
* @ORM\Column(type="datetime", name="updated_at", nullable=true)
*/
private $updatedAt;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set updatedAt
*
* @param DateTime $updatedAt
* @return ForumPost
*/
public function setUpdatedAt(\DateTime $updatedAt = null)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Set created_at
*
* @param datetime $createdAt
* @return ForumPost
*/
public function setCreatedAt($createdAt)
{
$this->created_at = $createdAt;
return $this;
}
/**
* Get updatedAt
*
* @return DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Get created_at
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* @var User $updatedBy
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id", referencedColumnName="id")
*/
private $updatedBy;
/**
* Set updated_at
*
* @param datetime $updatedAt
* @return ForumPost
*/
public function setUpdatedAt($updatedAt)
{
$this->updated_at = $updatedAt;
return $this;
}
/**
* Set updatedBy
*
* @param User $updatedBy
* @return ForumPost
*/
public function setUpdatedBy(User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updated_at
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updated_at;
}
/**
* Get updatedBy
*
* @return User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set update_reason
*
* @param string $updateReason
* @return ForumPost
*/
public function setUpdateReason($updateReason)
{
$this->update_reason = $updateReason;
return $this;
}
/**
* @var string $updateReason
* @ORM\Column(type="text", name="update_reason", nullable=true)
*/
private $updateReason;
/**
* Get update_reason
*
* @return string
*/
public function getUpdateReason()
{
return $this->update_reason;
}
/**
* Set updateReason
*
* @param string $updateReason
* @return ForumPost
*/
public function setUpdateReason($updateReason = null)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Set text
*
* @param text $text
* @return ForumPost
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get updateReason
*
* @return string
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Get text
*
* @return text
*/
public function getText()
{
return $this->text;
}
/**
* @var ForumTopic $topic
* @ORM\ManyToOne(targetEntity="ForumTopic", inversedBy="posts")
*/
private $topic;
/**
* Set created_by
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return ForumPost
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy = null)
{
$this->created_by = $createdBy;
return $this;
}
/**
* Set topic
*
* @param ForumTopic $topic
* @return ForumPost
*/
public function setTopic(ForumTopic $topic)
{
$this->topic = $topic;
if (($this->topic->getLastPost() === null) || ($this->topic->getLastPost()->getCreatedAt() > $this->createdAt))
$topic->setLastPost($this);
return $this;
}
/**
* Get created_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->created_by;
}
/**
* Get topic
*
* @return ForumTopic
*/
public function getTopic()
{
return $this->topic;
}
/**
* Set updated_by
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return ForumPost
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updated_by = $updatedBy;
return $this;
}
/**
* @var text $text
* @ORM\Column(type="text", nullable=false)
*/
private $text;
/**
* Get updated_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updated_by;
}
/**
* Set text
*
* @param string $text
* @return ForumPost
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Set topic
*
* @param ForumTopic $topic
* @return ForumPost
*/
public function setTopic(ForumTopic $topic)
{
$this->topic = $topic;
$topic->setLastPost($this);
return $this;
}
/**
* Get topic
*
* @return KekRozsak\FrontBundle\Entity\ForumTopic
*/
public function getTopic()
{
return $this->topic;
}
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
}

View File

@@ -4,305 +4,321 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
use KekRozsak\FrontBundle\Entity\ForumTopicGroup;
use KekRozsak\FrontBundle\Entity\ForumPost;
/**
* KekRozsak\FrontBundle\Entity\ForumTopic
* @ORM\Entity
* @ORM\Table(name="forum_topics", uniqueConstraints={@ORM\UniqueConstraint(columns={"topic_group_id", "title"}), @ORM\UniqueConstraint(columns={"topic_group_id", "slug"})})
*/
class ForumTopic
{
/**
* @var integer $id
*/
private $id;
public function __construct()
{
$this->posts = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* @var string $title
*/
private $title;
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string $slug
*/
private $slug;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var datetime $created_at
*/
private $created_at;
/**
* @var string $title
* @ORM\Column(type="string", length=100)
*/
private $title;
/**
* @var datetime $updated_at
*/
private $updated_at;
/**
* Set title
*
* @param string $title
* @return ForumTopic
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @var text $update_reason
*/
private $update_reason;
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $created_by;
/**
* @var string $slug
* @ORM\Column(type="string", length=100)
*/
private $slug;
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $updated_by;
/**
* Set slug
*
* @param string $slug
* @return ForumTopic
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* @var KekRozsak\FrontBundle\Entity\ForumTopicGroup
*/
private $topic_group;
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* @var datetime $createdAt
* @ORM\Column(type="datetime", name="created_at")
*/
private $createdAt;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set createdAt
*
* @param DateTime $createdAt
* @return ForumTopic
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Set title
*
* @param string $title
* @return ForumTopic
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get createdAt
*
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by_id")
*/
private $createdBy;
/**
* Set slug
*
* @param string $slug
* @return ForumTopic
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Set createdBy
*
* @param User $createdBy
* @return ForumTopic
*/
public function setCreatedBy(\User $createdBy)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Get createdBy
*
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set created_at
*
* @param datetime $createdAt
* @return ForumTopic
*/
public function setCreatedAt($createdAt)
{
$this->created_at = $createdAt;
return $this;
}
/**
* @var datetime $updatedAt
* @ORM\Column(type="datetime", name="updated_at", nullable=true)
*/
private $updatedAt;
/**
* Get created_at
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* Set updatedAt
*
* @param datetime $updatedAt
* @return ForumTopic
*/
public function setUpdatedAt(\DateTime $updatedAt = null)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Set updated_at
*
* @param datetime $updatedAt
* @return ForumTopic
*/
public function setUpdatedAt($updatedAt)
{
$this->updated_at = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Get updated_at
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updated_at;
}
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id")
*/
private $updatedBy;
/**
* Set update_reason
*
* @param text $updateReason
* @return ForumTopic
*/
public function setUpdateReason($updateReason)
{
$this->update_reason = $updateReason;
return $this;
}
/**
* Set updatedBy
*
* @param User $updatedBy
* @return ForumTopic
*/
public function setUpdatedBy(User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get update_reason
*
* @return text
*/
public function getUpdateReason()
{
return $this->update_reason;
}
/**
* Get updatedBy
*
* @return User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set created_by
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return ForumTopic
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy = null)
{
$this->created_by = $createdBy;
return $this;
}
/**
* @var text $updateReason
* @ORM\Column(type="text", name="update_reason")
*/
private $updateReason;
/**
* Get created_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->created_by;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return ForumTopic
*/
public function setUpdateReason($updateReason)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Set updated_by
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return ForumTopic
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updated_by = $updatedBy;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Get updated_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updated_by;
}
/**
* @var ForumTopicGroup
* @ORM\ManyToOne(targetEntity="ForumTopicGroup")
* @ORM\JoinColumn(name="topic_group_id", referencedColumnName="id")
*/
private $topicGroup;
/**
* Set topic_group
*
* @param KekRozsak\FrontBundle\Entity\ForumTopicGroup $topicGroup
* @return ForumTopic
*/
public function setTopicGroup(\KekRozsak\FrontBundle\Entity\ForumTopicGroup $topicGroup = null)
{
$this->topic_group = $topicGroup;
return $this;
}
/**
* Set topicGroup
*
* @param ForumTopicGroup $topicGroup
* @return ForumTopic
*/
public function setTopicGroup(ForumTopicGroup $topicGroup)
{
$this->topicGroup = $topicGroup;
return $this;
}
/**
* Get topic_group
*
* @return KekRozsak\FrontBundle\Entity\ForumTopicGroup
*/
public function getTopicGroup()
{
return $this->topic_group;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $posts;
/**
* Get topicGroup
*
* @return ForumTopicGroup
*/
public function getTopicGroup()
{
return $this->topicGroup;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\OneToMany(targetEntity="ForumPost", mappedBy="topic")
*/
private $posts;
public function __construct()
{
$this->posts = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Add posts
*
* @param KekRozsak\FrontBundle\Entity\ForumPost $posts
* @return ForumTopic
*/
public function addForumPost(\KekRozsak\FrontBundle\Entity\ForumPost $posts)
{
$this->posts[] = $posts;
return $this;
}
/**
* Add posts
*
* @param ForumPost $posts
* @return ForumTopic
*/
public function addForumPost(ForumPost $posts)
{
$this->posts[] = $posts;
return $this;
}
/**
* Get posts
*
* @return Doctrine\Common\Collections\Collection
*/
public function getPosts()
{
return $this->posts;
}
/**
* @var KekRozsak\FrontBundle\Entity\ForumPost
*/
private $lastPost;
/**
* Get posts
*
* @return Doctrine\Common\Collections\Collection
*/
public function getPosts()
{
return $this->posts;
}
/**
* @var ForumPost
* @ORM\OneToOne(targetEntity="ForumPost", cascade={"persist"})
* @ORM\JoinColumn(name="last_post_id", referencedColumnName="id")
*/
private $lastPost;
/**
* Set lastPost
*
* @param KekRozsak\FrontBundle\Entity\ForumPost $lastPost
* @return ForumTopic
*/
public function setLastPost(\KekRozsak\FrontBundle\Entity\ForumPost $lastPost)
{
$this->lastPost = $lastPost;
$this->topic_group->setLastPost($lastPost);
return $this;
}
/**
* Set lastPost
*
* @param ForumPost $lastPost
* @return ForumTopic
*/
public function setLastPost(ForumPost $lastPost = null)
{
$this->lastPost = $lastPost;
$this->topicGroup->setLastPost($lastPost);
return $this;
}
/**
* Get lastPost
*
* @return KekRozsak\FrontBundle\Entity\ForumPost
*/
public function getLastPost()
{
return $this->lastPost;
}
/**
* @var KekRozsak\FrontBundle\Entity\ForumPost
*/
private $last_post;
}
/**
* Get lastPost
*
* @return ForumPost
*/
public function getLastPost()
{
return $this->lastPost;
}
}

View File

@@ -4,292 +4,280 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
use KekRozsak\FrontBundle\Entity\ForumTopic;
use KekRozsak\FrontBundle\Entity\ForumPost;
/**
* KekRozsak\FrontBundle\Entity\ForumTopicGroup
* @ORM\Entity
* @ORM\Table(name="forum_topic_groups")
*/
class ForumTopicGroup
{
/**
* @var integer $id
*/
private $id;
public function __construct()
{
$this->topic = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* @var string $title
*/
private $title;
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string $slug
*/
private $slug;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var datetime $created_at
*/
private $created_at;
/**
* @var string $title
* @ORM\Column(type="string", length=100, unique=true)
*/
private $title;
/**
* @var datetime $updated_at
*/
private $updated_at;
/**
* Set title
*
* @param string $title
* @return ForumTopicGroup
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @var text $update_reason
*/
private $update_reason;
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $created_by;
/**
* @var string $slug
* @ORM\Column(type="string", length=100, unique=true)
*/
private $slug;
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $updated_by;
/**
* Set slug
*
* @param string $slug
* @return ForumTopicGroup
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var datetime $createdAt
* @ORM\Column(type="datetime", name="created_at")
*/
private $createdAt;
/**
* Set title
*
* @param string $title
* @return ForumTopicGroup
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Set createdAt
*
* @param DateTime $createdAt
* @return ForumTopicGroup
*/
public function setCreatedAt(\DateTime $createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Get createdAt
*
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set slug
*
* @param string $slug
* @return ForumTopicGroup
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by_id")
*/
private $createdBy;
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set createdBy
*
* @param User $createdBy
* @return ForumTopicGroup
*/
public function setCreatedBy(User $createdBy)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Set created_at
*
* @param datetime $createdAt
* @return ForumTopicGroup
*/
public function setCreatedAt($createdAt)
{
$this->created_at = $createdAt;
return $this;
}
/**
* Get createdBy
*
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Get created_at
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* @var datetime $updatedAt
* @ORM\Column(type="datetime", name="updated_at", nullable=true)
*/
private $updatedAt;
/**
* Set updated_at
*
* @param datetime $updatedAt
* @return ForumTopicGroup
*/
public function setUpdatedAt($updatedAt)
{
$this->updated_at = $updatedAt;
return $this;
}
/**
* Set updatedAt
*
* @param DateTime $updatedAt
* @return ForumTopicGroup
*/
public function setUpdatedAt(\DateTime $updatedAt = null)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updated_at
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updated_at;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set update_reason
*
* @param text $updateReason
* @return ForumTopicGroup
*/
public function setUpdateReason($updateReason)
{
$this->update_reason = $updateReason;
return $this;
}
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id")
*/
private $updatedBy;
/**
* Get update_reason
*
* @return text
*/
public function getUpdateReason()
{
return $this->update_reason;
}
/**
* Set updatedBy
*
* @param User $updatedBy
* @return ForumTopicGroup
*/
public function setUpdatedBy(User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Set created_by
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return ForumTopicGroup
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy = null)
{
$this->created_by = $createdBy;
return $this;
}
/**
* Get updatedBy
*
* @return User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Get created_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->created_by;
}
/**
* @var text $update_reason
* @ORM\Column(type="text", name="update_reason", nullable=true)
*/
private $updateReason;
/**
* Set updated_by
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return ForumTopicGroup
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updated_by = $updatedBy;
return $this;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return ForumTopicGroup
*/
public function setUpdateReason($updateReason = null)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Get updated_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updated_by;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $topic;
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
public function __construct()
{
$this->topic = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Add topic
*
* @param KekRozsak\FrontBundle\Entity\ForumTopic $topic
* @return ForumTopicGroup
*/
public function addForumTopic(\KekRozsak\FrontBundle\Entity\ForumTopic $topic)
{
$this->topic[] = $topic;
return $this;
}
/**
* @var ForumPost
* @ORM\OneToOne(targetEntity="ForumPost", cascade={"persist"})
* @ORM\JoinColumn(name="last_post_id")
*/
private $lastPost;
/**
* Get topic
*
* @return Doctrine\Common\Collections\Collection
*/
public function getTopic()
{
return $this->topic;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $topics;
/**
* Set lastPost
*
* @param ForumPost $lastPost
* @return ForumTopicGroup
*/
public function setLastPost(ForumPost $lastPost = null)
{
$this->lastPost = $lastPost;
return $this;
}
/**
* Get lastPost
*
* @return ForumPost
*/
public function getLastPost()
{
return $this->lastPost;
}
/**
* Get topics
*
* @return Doctrine\Common\Collections\Collection
*/
public function getTopics()
{
return $this->topics;
}
/**
* @var KekRozsak\FrontBundle\Entity\ForumPost
*/
private $lastPost;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\OneToMany(targetEntity="ForumTopic", mappedBy="topicGroup")
*/
private $topics;
/**
* Set lastPost
*
* @param KekRozsak\FrontBundle\Entity\ForumPost $lastPost
* @return ForumTopicGroup
*/
public function setLastPost(\KekRozsak\FrontBundle\Entity\ForumPost $lastPost = null)
{
$this->lastPost = $lastPost;
return $this;
}
/**
* Get lastPost
*
* @return KekRozsak\FrontBundle\Entity\ForumPost
*/
public function getLastPost()
{
return $this->lastPost;
}
/**
* @var KekRozsak\FrontBundle\Entity\ForumPost
*/
private $last_post;
}
/**
* Get topics
*
* @return Doctrine\Common\Collections\Collection
*/
public function getTopics()
{
return $this->topics;
}
}

View File

@@ -0,0 +1,261 @@
<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* KekRozsak\FrontBundle\Entity\Group
* @ORM\Entity
* @ORM\Table(name="groups")
*/
class Group
{
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string $name
* @ORM\Column(type="string", length=50, nullable=false, unique=true)
*/
private $name;
/**
* @var string $slug
* @ORM\Column(type="string", length=50, nullable=false, unique=true)
*/
private $slug;
/**
* @var datetime $createdAt
* @ORM\Column(type="datetime", name="created_at", nullable=false)
*/
private $createdAt;
/**
* @var datetime $updatedAt
* @ORM\Column(type="datetime", name="updated_at", nullable=true)
*/
private $updatedAt;
/**
* @var text $updateReason
* @ORM\Column(type="text", name="update_reason", nullable=true)
*/
private $updateReason;
/**
* @var KekRozsak\FrontBundle\Entity\User $createdBy
* @ORM\ManyToOne(targetEntity="User")
*/
private $createdBy;
/**
* @var KekRozsak\FrontBundle\Entity\User $updatedBy
* @ORM\ManyToOne(targetEntity="User")
*/
private $updatedBy;
/**
* @var KekRozsak\FrontBundle\Entity\User $leader
* @ORM\ManyToOne(targetEntity="User", inversedBy="ledGroups")
*/
private $leader;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return Group
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set slug
*
* @param string $slug
* @return Group
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set createdAt
*
* @param datetime $createdAt
* @return Group
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param datetime $updatedAt
* @return Group
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return Group
*/
public function setUpdateReason($updateReason)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Set createdBy
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return Group
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy = null)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set updatedBy
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return Group
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updatedBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set leader
*
* @param KekRozsak\FrontBundle\Entity\User $leader
* @return Group
*/
public function setLeader(\KekRozsak\FrontBundle\Entity\User $leader = null)
{
$this->leader = $leader;
return $this;
}
/**
* Get leader
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getLeader()
{
return $this->leader;
}
/**
* @var ArrayCollection $documents
* @ORM\ManyToMany(targetEntity="Document", inversedBy="groups")
*/
private $documents;
}

View File

@@ -6,238 +6,252 @@ use Doctrine\ORM\Mapping as ORM;
/**
* KekRozsak\FrontBundle\Entity\News
* @ORM\Entity
* @ORM\Table(name="news")
*/
class News
{
/**
* @var integer $id
*/
private $id;
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer", name="id")
*/
private $id;
/**
* @var datetime $created_at
*/
private $created_at;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var datetime $updated_at
*/
private $updated_at;
/**
* @var datetime $createdAt
* @ORM\Column(type="datetime", name="created_at")
*/
private $createdAt;
/**
* @var text $update_reason
*/
private $update_reason;
/**
* Set createdAt
*
* @param datetime $createdAt
* @return News
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @var string $title
*/
private $title;
/**
* Get createdAt
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @var string $slug
*/
private $slug;
/**
* @var datetime $updatedAt
* @ORM\Column(type="datetime", name="updated_at", nullable=true)
*/
private $updatedAt;
/**
* @var text $text
*/
private $text;
/**
* @var text $updateReason
* @ORM\Column(type="text", name="update_reason", nullable=true)
*/
private $updateReason;
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $created_by;
/**
* @var string $title
* @ORM\Column(type="string", length=100, nullable=false)
*/
private $title;
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $updated_by;
/**
* @var string $slug
* @ORM\Column(type="string", length=100, nullable=false, unique=true)
*/
private $slug;
/**
* @var text $text
* @ORM\Column(type="text", nullable=true)
*/
private $text;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var KekRozsak\FrontBundle\Entity\User $createdBy
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by_id", referencedColumnName="id")
*/
private $createdBy;
/**
* Set created_at
*
* @param datetime $createdAt
* @return News
*/
public function setCreatedAt($createdAt)
{
$this->created_at = $createdAt;
return $this;
}
/**
* @var KekRozsak\FrontBundle\Entity\User $updatedBy
* @ORM\ManyToOne(targetEntity="User", fetch="EXTRA_LAZY")
* @ORM\JoinColumn(name="updated_by_id", referencedColumnName="id")
*/
private $updatedBy;
/**
* Get created_at
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* Set updatedAt
*
* @param datetime $updatedAt
* @return News
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Set updated_at
*
* @param datetime $updatedAt
* @return News
*/
public function setUpdatedAt($updatedAt)
{
$this->updated_at = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Get updated_at
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updated_at;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return News
*/
public function setUpdateReason($updateReason)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Set update_reason
*
* @param text $updateReason
* @return News
*/
public function setUpdateReason($updateReason)
{
$this->update_reason = $updateReason;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Get update_reason
*
* @return text
*/
public function getUpdateReason()
{
return $this->update_reason;
}
/**
* Set title
*
* @param string $title
* @return News
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Set title
*
* @param string $title
* @return News
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set slug
*
* @param string $slug
* @return News
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Set slug
*
* @param string $slug
* @return News
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set text
*
* @param text $text
* @return News
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Set text
*
* @param text $text
* @return News
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return text
*/
public function getText()
{
return $this->text;
}
/**
* Get text
*
* @return text
*/
public function getText()
{
return $this->text;
}
/**
* Set createdBy
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return News
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy = null)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Set created_by
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return News
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy = null)
{
$this->created_by = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Get created_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->created_by;
}
/**
* Set updatedBy
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return News
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Set updated_by
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return News
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updated_by = $updatedBy;
return $this;
}
/**
* Get updated_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updated_by;
}
}
/**
* Get updatedBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
}

View File

@@ -0,0 +1,292 @@
<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
/**
* KekRozsak\FrontBundle\Entity\Poll
* @ORM\Entity
* @ORM\Table(name="polls")
*/
class Poll
{
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var DateTime $createdAt
* @ORM\Column(type="datetime", nullable=false, name="created_at")
*/
private $createdAt;
/**
* @var DateTime $updatedAt
* @ORM\Column(type="datetime", name="updated_at")
*/
private $updatedAt;
/**
* @var text $updateReason
* @ORM\Column(type="text", name="update_reason")
*/
private $updateReason;
/**
* @var DateTime $pollEnd
* @ORM\Column(type="datetime", nullable=false, name="poll_end")
*/
private $pollEnd;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\OneToMany(targetEntity="PollAnswer", mappedBy="answers")
*/
private $answers;
/**
* @var KekRozsak\FrontBundle\Entity\User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by_id", referencedColumnName="id")
*/
private $createdBy;
/**
* @var KekRozsak\FrontBundle\Entity\User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id", referencedColumnName="id")
*/
private $updatedBy;
public function __construct()
{
$this->answers = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set createdAt
*
* @param datetime $createdAt
* @return Poll
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param datetime $updatedAt
* @return Poll
*/
public function setUpdatedAt($updatedAt = null)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return Poll
*/
public function setUpdateReason($updateReason = null)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Set pollEnd
*
* @param datetime $pollEnd
* @return Poll
*/
public function setPollEnd($pollEnd = null)
{
$this->pollEnd = $pollEnd;
return $this;
}
/**
* Get pollEnd
*
* @return datetime
*/
public function getPollEnd()
{
return $this->pollEnd;
}
/**
* Add answers
*
* @param KekRozsak\FrontBundle\Entity\PollAnswer $answers
* @return Poll
*/
public function addPollAnswer(\KekRozsak\FrontBundle\Entity\PollAnswer $answers)
{
$this->answers[] = $answers;
return $this;
}
/**
* Get answers
*
* @return Doctrine\Common\Collections\Collection
*/
public function getAnswers()
{
return $this->answers;
}
/**
* Set createdBy
*
* @param KekRozsak\FrontBundle\Entity\User $createdBy
* @return Poll
*/
public function setCreatedBy(\KekRozsak\FrontBundle\Entity\User $createdBy)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set updatedBy
*
* @param KekRozsak\FrontBundle\Entity\User $updatedBy
* @return Poll
*/
public function setUpdatedBy(\KekRozsak\FrontBundle\Entity\User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updatedBy
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* @var text $text
* @ORM\Column(type="text", nullable=false)
*/
private $text;
/**
* @var boolean $anyoneCanAddAnswers
* @ORM\Column(type="boolean", nullable=false)
*/
private $anyoneCanAddAnswers;
/**
* Set text
*
* @param text $text
* @return Poll
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return text
*/
public function getText()
{
return $this->text;
}
/**
* Set anyoneCanAddAnswers
*
* @param boolean $anyoneCanAddAnswers
* @return Poll
*/
public function setAnyoneCanAddAnswers($anyoneCanAddAnswers)
{
$this->anyoneCanAddAnswers = $anyoneCanAddAnswers;
return $this;
}
/**
* Get anyoneCanAddAnswers
*
* @return boolean
*/
public function getAnyoneCanAddAnswers()
{
return $this->anyoneCanAddAnswers;
}
}

View File

@@ -0,0 +1,265 @@
<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
use KekRozsak\FrontBundle\Entity\Poll;
/**
* KekRozsak\FrontBundle\Entity\PollAnswer
* @ORM\Entity
* @ORM\Table(name="poll_answers")
*/
class PollAnswer
{
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var DateTime $createdAt
* @ORM\Column(name="created_at", type="datetime")
*/
private $createdAt;
/**
* @var DateTime $updatedAt
* @ORM\Column(name="updated_at", type="datetime")
*/
private $updatedAt;
/**
* @var text $updateReason
* @ORM\Column(type="text", name="update_reason", nullable=true)
*/
private $updateReason;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\ManyToMany(targetEntity="User", inversedBy="pollVotes")
*/
private $voters;
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by_id")
*/
private $createdBy;
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by_id")
*/
private $updatedBy;
/**
* @var poll
* @ORM\ManyToOne(targetEntity="Poll", inversedBy="answers")
*/
private $poll;
public function __construct()
{
$this->voters = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set createdAt
*
* @param datetime $createdAt
* @return PollAnswer
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return datetime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param datetime $updatedAt
* @return PollAnswer
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return datetime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updateReason
*
* @param text $updateReason
* @return PollAnswer
*/
public function setUpdateReason($updateReason)
{
$this->updateReason = $updateReason;
return $this;
}
/**
* Get updateReason
*
* @return text
*/
public function getUpdateReason()
{
return $this->updateReason;
}
/**
* Add voters
*
* @param User $voters
* @return PollAnswer
*/
public function addVoters(User $voters)
{
$this->voters[] = $voters;
return $this;
}
/**
* Get voters
*
* @return Doctrine\Common\Collections\Collection
*/
public function getVoters()
{
return $this->voters;
}
/**
* Set createdBy
*
* @param User $createdBy
* @return PollAnswer
*/
public function setCreatedBy(User $createdBy = null)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Get createdBy
*
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Set updatedBy
*
* @param User $updatedBy
* @return PollAnswer
*/
public function setUpdatedBy(User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Get updatedBy
*
* @return User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set poll
*
* @param Poll $poll
* @return PollAnswer
*/
public function setPoll(Poll $poll = null)
{
$this->poll = $poll;
return $this;
}
/**
* Get poll
*
* @return Poll
*/
public function getPoll()
{
return $this->poll;
}
/**
* @var string $text
* @ORM\Column(type="text", nullable=false)
*/
private $text;
/**
* Set text
*
* @param string $text
* @return PollAnswer
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
}

View File

@@ -1,145 +0,0 @@
<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\Role\RoleInterface;
/**
* KekRozsak\FrontBundle\Entity\Role
*/
class Role implements RoleInterface
{
/**
* @var integer $id
*/
private $id;
/**
* @var string $name
*/
private $name;
/**
* @var string $display_name
*/
private $display_name;
/**
* @var boolean $can_be_assigned
*/
private $can_be_assigned;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $included_roles;
public function __construct()
{
$this->included_roles = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return Role
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set display_name
*
* @param string $displayName
* @return Role
*/
public function setDisplayName($displayName)
{
$this->display_name = $displayName;
return $this;
}
/**
* Get display_name
*
* @return string
*/
public function getDisplayName()
{
return $this->display_name;
}
/**
* Set can_be_assigned
*
* @param boolean $canBeAssigned
* @return Role
*/
public function setCanBeAssigned($canBeAssigned)
{
$this->can_be_assigned = $canBeAssigned;
return $this;
}
/**
* Get can_be_assigned
*
* @return boolean
*/
public function getCanBeAssigned()
{
return $this->can_be_assigned;
}
/**
* Add included_roles
*
* @param KekRozsak\FrontBundle\Entity\Role $includedRoles
* @return Role
*/
public function addRole(\KekRozsak\FrontBundle\Entity\Role $includedRoles)
{
$this->included_roles[] = $includedRoles;
return $this;
}
/**
* Get included_roles
*
* @return Doctrine\Common\Collections\Collection
*/
public function getIncludedRoles()
{
return $this->included_roles;
}
public function getRole()
{
return $this->name;
}
}

View File

@@ -5,360 +5,484 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
use KekRozsak\FrontBundle\Entity\Article;
use KekRozsak\FrontBundle\Entity\ForumPost;
use KekRozsak\FrontBundle\Entity\Group;
use KekRozsak\FrontBundle\Entity\Document;
use KekRozsak\FrontBundle\Entity\UserData;
use KekRozsak\FrontBundle\Entity\PollAnswer;
/**
* KekRozsak\FrontBundle\Entity\User
* @ORM\Entity
* @ORM\Table(name="users")
* @DoctrineAssert\UniqueEntity(fields={"username"}, message="Ez a felhasználónév már foglalt. Kérlek, válassz egy másikat!", groups={"registration"})
* @DoctrineAssert\UniqueEntity(fields={"email"}, message="Ez az e-mail cím már foglalt. Kérlek, válassz egy másikat!", groups={"registration"})
* @DoctrineAssert\UniqueEntity(fields={"displayName"}, message="Ez a név már foglalt. Kérlek, válassz egy másikat!", groups={"registration"})
*/
class User implements UserInterface, AdvancedUserInterface
{
/**
* @var integer $id
*/
private $id;
/**
* @var integer $id
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string $username
*/
private $username;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* @var string $password
*/
private $password;
/**
* @var string $username
* @ORM\Column(type="string", length=50, nullable=false, unique=true)
* @Assert\NotBlank(groups={"registration"})
*/
private $username;
/**
* @var string $email
*/
private $email;
/**
* Set username
*
* @param string $username
* @return User
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* @var DateTime $registered_at
*/
private $registered_at;
/**
* Get username
*
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* @var string $display_name
*/
private $display_name;
/**
* @var string $password
* @ORM\Column(type="string", length=50, nullable=false)
* @Assert\NotBlank(groups={"registration"})
*/
private $password;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $roles;
/**
* Set password
*
* @param string $password
* @return User
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
public function __construct()
{
$this->roles = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Get password
*
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* Set username
*
* @param string $username
* @return User
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* @var string $email
* @ORM\Column(type="string", length=50, unique=true, nullable=false)
* @Assert\NotBlank(groups={"registration"})
* @Assert\Email(groups={"registration"})
*/
private $email;
/**
* Get username
*
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* Set email
*
* @param string $email
* @return User
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Set password
*
* @param string $password
* @return User
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Get password
*
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* @var DateTime $registeredAt
* @ORM\Column(type="datetime", name="registered_at", nullable=false)
* @Assert\NotBlank()
* TODO: original validation.yml contained Type: \DateTime
* Assert\Type("\\DateTime")
*/
private $registeredAt;
/**
* Set email
*
* @param string $email
* @return User
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Set registeredAt
*
* @param DateTime $registeredAt
* @return User
*/
public function setRegisteredAt(\DateTime $registeredAt)
{
$this->registeredAt = $registeredAt;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Get registeredAt
*
* @return DateTime
*/
public function getRegisteredAt()
{
return $this->registeredAt;
}
/**
* Set registered_at
*
* @param DateTime $registeredAt
* @return User
*/
public function setRegisteredAt(\DateTime $registeredAt)
{
$this->registered_at = $registeredAt;
return $this;
}
/**
* @var string $displayName
* @ORM\Column(type="string", length=50, nullable=false, unique=true, name="display_name")
*/
private $displayName;
/**
* Get registered_at
*
* @return DateTime
*/
public function getRegisteredAt()
{
return $this->registered_at;
}
/**
* Set displayName
*
* @param string $displayName
* @return User
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
return $this;
}
/**
* Set display_name
*
* @param string $displayName
* @return User
*/
public function setDisplayName($displayName)
{
$this->display_name = $displayName;
return $this;
}
/**
* Get displayName
*
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Get display_name
*
* @return string
*/
public function getDisplayName()
{
return $this->display_name;
}
/**
* @var User $acceptedBy
* @ORM\ManyToOne(targetEntity="User", fetch="EXTRA_LAZY")
* @ORM\JoinColumn(name="accepted_by_id", referencedColumnName="id")
*/
private $acceptedBy;
/**
* Add roles
*
* @param KekRozsak\FrontBundle\Entity\Role $roles
* @return User
*/
public function addRole(\KekRozsak\FrontBundle\Entity\Role $roles)
{
$this->roles[] = $roles;
return $this;
}
/**
* Set acceptedBy
*
* @param User $acceptedBy
* @return User
*/
public function setAcceptedBy(User $acceptedBy = null)
{
$this->acceptedBy = $acceptedBy;
return $this;
}
/**
* Get roles
*
* @return Doctrine\Common\Collections\Collection
*/
public function getRoles()
{
return $this->roles->toArray();
}
/**
* Get acceptedBy
*
* @return User
*/
public function getAcceptedBy()
{
return $this->acceptedBy;
}
public function getRolesCollection()
{
return $this->roles;
}
/**
* @var datetime $lastLoginAt
* @ORM\Column(type="datetime", nullable=true, name="last_login_at")
*/
private $lastLoginAt;
public function eraseCredentials()
{
}
/**
* Set lastLoginAt
*
* @param DateTime $lastLoginAt
* @return User
*/
public function setLastLoginAt(\DateTime $lastLoginAt = null)
{
$this->lastLoginAt = $lastLoginAt;
return $this;
}
public function getSalt()
{
return $this->password;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $articles;
/**
* Get lastLoginAt
*
* @return DateTime
*/
public function getLastLoginAt()
{
return $this->lastLoginAt;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $forum_posts;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\OneToMany(targetEntity="Article", mappedBy="createdBy", fetch="EXTRA_LAZY")
*/
private $articles;
/**
* Add articles
*
* @param Article $articles
* @return User
*/
public function addArticle(Article $articles)
{
$this->articles[] = $articles;
return $this;
}
/**
* Add articles
*
* @param KekRozsak\FrontBundle\Entity\Article $articles
* @return User
*/
public function addArticle(\KekRozsak\FrontBundle\Entity\Article $articles)
{
$this->articles[] = $articles;
return $this;
}
/**
* Get articles
*
* @return Doctrine\Common\Collections\Collection
*/
public function getArticles()
{
return $this->articles;
}
/**
* Get articles
*
* @return Doctrine\Common\Collections\Collection
*/
public function getArticles()
{
return $this->articles;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection
* @ORM\OneToMany(targetEntity="ForumPost", mappedBy="createdBy", fetch="EXTRA_LAZY")
*/
private $forumPosts;
/**
* Add forum_posts
*
* @param KekRozsak\FrontBundle\Entity\ForumPost $forumPosts
* @return User
*/
public function addForumPost(\KekRozsak\FrontBundle\Entity\ForumPost $forumPosts)
{
$this->forum_posts[] = $forumPosts;
return $this;
}
/**
* Add forumPosts
*
* @param ForumPost $forumPosts
* @return User
*/
public function addForumPost(ForumPost $forumPosts)
{
$this->forumPosts[] = $forumPosts;
return $this;
}
/**
* Get forum_posts
*
* @return Doctrine\Common\Collections\Collection
*/
public function getForumPosts()
{
return $this->forum_posts;
}
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $accepted_by;
/**
* Get forumPosts
*
* @return Doctrine\Common\Collections\Collection
*/
public function getForumPosts()
{
return $this->forumPosts;
}
/**
* @var \Doctrine\Common\Collections\ArrayCollection $ledGroups
* @ORM\OneToMany(targetEntity="Group", mappedBy="leader", fetch="EXTRA_LAZY")
*/
private $ledGroups;
/**
* Set accepted_by
*
* @param KekRozsak\FrontBundle\Entity\User $acceptedBy
* @return User
*/
public function setAcceptedBy(\KekRozsak\FrontBundle\Entity\User $acceptedBy = null)
{
$this->accepted_by = $acceptedBy;
return $this;
}
/**
* Add ledGroups
*
* @param Group $group
* @return User
*/
public function addGroup(Group $group)
{
$this->ledGroups[] = $group;
return $this;
}
/**
* Get accepted_by
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getAcceptedBy()
{
return $this->accepted_by;
}
/**
* Get ledGroups
*
* @return Doctrine\Common\Collections\Collection
*/
public function getLedGroups()
{
return $this->ledGroups;
}
public function isAccountNonExpired()
{
return true;
}
public function isAccountNonLocked()
{
return true;
}
public function isCredentialsNonExpired()
{
return true;
}
public function isEnabled()
{
return ($this->accepted_by !== null);
}
/**
* @var datetime $last_login_at
*/
private $last_login_at;
/**
* @var \Doctrine\Common\Collections\ArrayCollection $createdDocuments
* @ORM\OneToMany(targetEntity="Document", mappedBy="createdBy", fetch="EXTRA_LAZY")
*/
private $createdDocuments;
/**
* Add createdDocuments
*
* @param Document $document
* @return User
*/
public function addDocument(Document $document)
{
$this->createdDocuments[] = $document;
return $this;
}
/**
* Set last_login_at
*
* @param datetime $lastLoginAt
* @return User
*/
public function setLastLoginAt($lastLoginAt)
{
$this->last_login_at = $lastLoginAt;
return $this;
}
/**
* Get createdDocuments
*
* @return Doctrine\Common\Collections\Collection
*/
public function getCreatedDocuments()
{
return $this->createdDocuments;
}
/**
* Get last_login_at
*
* @return datetime
*/
public function getLastLoginAt()
{
return $this->last_login_at;
}
/**
* @var KekRozsak\FrontBundle\Entity\UserData
*/
private $user_data;
/**
* @var UserData $userData
* @ORM\OneToOne(targetEntity="UserData", mappedBy="user", fetch="EXTRA_LAZY", cascade={"persist"})
* @ORM\JoinColumn(name="id", referencedColumnName="user_id")
*/
private $userData;
/**
* Set userData
*
* @param UserData $userData
* @return User
*/
public function setUserData(UserData $userData = null)
{
$this->userData = $userData;
return $this;
}
/**
* Set user_data
*
* @param KekRozsak\FrontBundle\Entity\UserData $userData
* @return User
*/
public function setUserData(\KekRozsak\FrontBundle\Entity\UserData $userData = null)
{
$this->user_data = $userData;
return $this;
}
/**
* Get userData
*
* @return UserData
*/
public function getUserData()
{
return $this->userData;
}
/**
* Get user_data
*
* @return KekRozsak\FrontBundle\Entity\UserData
*/
public function getUserData()
{
return $this->user_data;
}
}
/**
* @var PollAnswer
* @ORM\ManyToMany(targetEntity="PollAnswer", mappedBy="voters", fetch="EXTRA_LAZY")
*/
private $pollVotes;
/**
* Set pollVotes
*
* @param PollAnswer $pollVotes
* @return User
*/
public function setPollVotes(PollAnswer $pollVotes = null)
{
$this->pollVotes = $pollVotes;
return $this;
}
/**
* Get pollVotes
*
* @return PollAnswer
*/
public function getPollVotes()
{
return $this->pollVotes;
}
/**
* Add pollVotes
*
* @param PollAnswer $pollVotes
* @return User
*/
public function addPollAnswer(PollAnswer $pollVotes)
{
$this->pollVotes[] = $pollVotes;
return $this;
}
/**
* UserInterface::eraseCredentials()
*/
public function eraseCredentials()
{
}
/**
* UserInterface::getSalt()
*
* As we use crypt() to encrypt and check password, salt is always the
* same as the encrypted password.
*/
public function getSalt()
{
return $this->password;
}
/**
* UserInterface::getRoles
*/
public function getRoles()
{
return array('ROLE_USER');
}
/**
* AdvancedUserInterface::isAccountNonExpired()
*/
public function isAccountNonExpired()
{
return true;
}
/**
* AdvancedUserInterface::isAccountNonLocked()
*/
public function isAccountNonLocked()
{
return true;
}
/**
* AdvancedUserInterface::isCredentialsNonExpired()
*/
public function isCredentialsNonExpired()
{
return true;
}
/**
* AdvancedUserInterface::isEnabled()
*/
public function isEnabled()
{
return ($this->acceptedBy !== null);
}
}

View File

@@ -4,388 +4,379 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use KekRozsak\FrontBundle\Entity\User;
/**
* KekRozsak\FrontBundle\Entity\UserData
* @ORM\Entity
* @ORM\Table(name="user_data")
*/
class UserData
{
/**
* @var KekRozsak\FrontBundle\Entity\User
*/
private $user;
/**
* @var User $user
* @ORM\Id
* @ORM\OneToOne(targetEntity="User", inversedBy="userData")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
protected $user;
/**
* Set user
*
* @param User $user
* @return UserData
*/
public function setUser(User $user = null)
{
$this->user = $user;
$this->userId = $user->getId();
return $this;
}
/**
* Set user
*
* @param KekRozsak\FrontBundle\Entity\User $user
* @return UserData
*/
public function setUser(\KekRozsak\FrontBundle\Entity\User $user = null)
{
$this->user = $user;
$this->user_id = $user->getId();
return $this;
}
/**
* Get user
*
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* Get user
*
* @return KekRozsak\FrontBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
/**
* @var integer $user_id
*/
private $user_id;
/**
* @var boolean $emailPublic
* @ORM\Column(type="boolean", name="email_public")
*/
protected $emailPublic;
/**
* @var string $realName
*/
private $realName;
/**
* Set emailPublic
*
* @param boolean $emailPublic
* @return UserData
*/
public function setEmailPublic($emailPublic)
{
$this->emailPublic = $emailPublic;
return $this;
}
/**
* @var boolean $realNamePublic
*/
private $realNamePublic;
/**
* Get emailPublic
*
* @return boolean
*/
public function getEmailPublic()
{
return $this->emailPublic;
}
/**
* @var string $realName
* @ORM\Column(name="real_name", type="string", length=100, nullable=true)
*/
protected $realName;
/**
* Set user_id
*
* @param integer $userId
* @return UserData
*/
public function setUserId($userId)
{
$this->user_id = $userId;
return $this;
}
/**
* Set realName
*
* @param string $realName
* @return UserData
*/
public function setRealName($realName)
{
$this->realName = $realName;
return $this;
}
/**
* Get user_id
*
* @return integer
*/
public function getUserId()
{
return $this->user_id;
}
/**
* Get realName
*
* @return string
*/
public function getRealName()
{
return $this->realName;
}
/**
* Set realName
*
* @param string $realName
* @return UserData
*/
public function setRealName($realName)
{
$this->realName = $realName;
return $this;
}
/**
* @var boolean $realNamePublic
* @ORM\Column(name="real_name_public", type="boolean", nullable=false)
*/
protected $realNamePublic;
/**
* Get realName
*
* @return string
*/
public function getRealName()
{
return $this->realName;
}
/**
* Set realNamePublic
*
* @param boolean $realNamePublic
* @return UserData
*/
public function setRealNamePublic($realNamePublic)
{
$this->realNamePublic = $realNamePublic;
return $this;
}
/**
* Set realNamePublic
*
* @param boolean $realNamePublic
* @return UserData
*/
public function setRealNamePublic($realNamePublic)
{
$this->realNamePublic = $realNamePublic;
return $this;
}
/**
* Get realNamePublic
*
* @return boolean
*/
public function getRealNamePublic()
{
return $this->realNamePublic;
}
/**
* Get realNamePublic
*
* @return boolean
*/
public function getRealNamePublic()
{
return $this->realNamePublic;
}
/**
* @var text $selfDescription
*/
private $selfDescription;
/**
* @var text $selfDescription
* @ORM\Column(name="self_description", type="text", nullable=true)
*/
protected $selfDescription;
/**
* @var boolean $emailPublic
*/
private $emailPublic;
/**
* Set selfDescription
*
* @param text $selfDescription
* @return UserData
*/
public function setSelfDescription($selfDescription)
{
$this->selfDescription = $selfDescription;
return $this;
}
/**
* Get selfDescription
*
* @return text
*/
public function getSelfDescription()
{
return $this->selfDescription;
}
/**
* Set selfDescription
*
* @param text $selfDescription
* @return UserData
*/
public function setSelfDescription($selfDescription)
{
$this->selfDescription = $selfDescription;
return $this;
}
/**
* @var string $msnAddress
* @ORM\Column(type="string", length=100, name="msn_address", nullable=true)
*/
protected $msnAddress;
/**
* Get selfDescription
*
* @return text
*/
public function getSelfDescription()
{
return $this->selfDescription;
}
/**
* Set msnAddress
*
* @param string $msnAddress
* @return UserData
*/
public function setMsnAddress($msnAddress)
{
$this->msnAddress = $msnAddress;
return $this;
}
/**
* Set emailPublic
*
* @param boolean $emailPublic
* @return UserData
*/
public function setEmailPublic($emailPublic)
{
$this->emailPublic = $emailPublic;
return $this;
}
/**
* Get msnAddress
*
* @return string
*/
public function getMsnAddress()
{
return $this->msnAddress;
}
/**
* Get emailPublic
*
* @return boolean
*/
public function getEmailPublic()
{
return $this->emailPublic;
}
/**
* @var string $msnAddress
*/
private $msnAddress;
/**
* @var boolean $msnAddressPublic
* @ORM\Column(type="boolean", name="msn_address_public", nullable=false)
*/
protected $msnAddressPublic;
/**
* @var boolean $msnAddressPublic
*/
private $msnAddressPublic;
/**
* Set msnAddressPublic
*
* @param boolean $msnAddressPublic
* @return UserData
*/
public function setMsnAddressPublic($msnAddressPublic)
{
$this->msnAddressPublic = $msnAddressPublic;
return $this;
}
/**
* @var string $googleTalk
*/
private $googleTalk;
/**
* Get msnAddressPublic
*
* @return boolean
*/
public function getMsnAddressPublic()
{
return $this->msnAddressPublic;
}
/**
* @var boolean $googleTalkPublic
*/
private $googleTalkPublic;
/**
* @var string $googleTalk
* @ORM\Column(type="string", length=100, name="google_talk", nullable=true)
*/
protected $googleTalk;
/**
* @var string $skype
*/
private $skype;
/**
* Set googleTalk
*
* @param string $googleTalk
* @return UserData
*/
public function setGoogleTalk($googleTalk)
{
$this->googleTalk = $googleTalk;
return $this;
}
/**
* @var boolean $skypePublic
*/
private $skypePublic;
/**
* Get googleTalk
*
* @return string
*/
public function getGoogleTalk()
{
return $this->googleTalk;
}
/**
* @var boolean $googleTalkPublic
* @ORM\Column(type="boolean", name="google_talk_public", nullable=false)
*/
protected $googleTalkPublic;
/**
* Set msnAddress
*
* @param string $msnAddress
* @return UserData
*/
public function setMsnAddress($msnAddress)
{
$this->msnAddress = $msnAddress;
return $this;
}
/**
* Set googleTalkPublic
*
* @param boolean $googleTalkPublic
* @return UserData
*/
public function setGoogleTalkPublic($googleTalkPublic)
{
$this->googleTalkPublic = $googleTalkPublic;
return $this;
}
/**
* Get msnAddress
*
* @return string
*/
public function getMsnAddress()
{
return $this->msnAddress;
}
/**
* Get googleTalkPublic
*
* @return boolean
*/
public function getGoogleTalkPublic()
{
return $this->googleTalkPublic;
}
/**
* Set msnAddressPublic
*
* @param boolean $msnAddressPublic
* @return UserData
*/
public function setMsnAddressPublic($msnAddressPublic)
{
$this->msnAddressPublic = $msnAddressPublic;
return $this;
}
/**
* @var string $skype
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $skype;
/**
* Get msnAddressPublic
*
* @return boolean
*/
public function getMsnAddressPublic()
{
return $this->msnAddressPublic;
}
/**
* Set skype
*
* @param string $skype
* @return UserData
*/
public function setSkype($skype)
{
$this->skype = $skype;
return $this;
}
/**
* Set googleTalk
*
* @param string $googleTalk
* @return UserData
*/
public function setGoogleTalk($googleTalk)
{
$this->googleTalk = $googleTalk;
return $this;
}
/**
* Get skype
*
* @return string
*/
public function getSkype()
{
return $this->skype;
}
/**
* Get googleTalk
*
* @return string
*/
public function getGoogleTalk()
{
return $this->googleTalk;
}
/**
* @var boolean $skypePublic
* @ORM\Column(type="boolean", name="skype_public", nullable=false)
*/
protected $skypePublic;
/**
* Set googleTalkPublic
*
* @param boolean $googleTalkPublic
* @return UserData
*/
public function setGoogleTalkPublic($googleTalkPublic)
{
$this->googleTalkPublic = $googleTalkPublic;
return $this;
}
/**
* Set skypePublic
*
* @param boolean $skypePublic
* @return UserData
*/
public function setSkypePublic($skypePublic)
{
$this->skypePublic = $skypePublic;
return $this;
}
/**
* Get googleTalkPublic
*
* @return boolean
*/
public function getGoogleTalkPublic()
{
return $this->googleTalkPublic;
}
/**
* Get skypePublic
*
* @return boolean
*/
public function getSkypePublic()
{
return $this->skypePublic;
}
/**
* Set skype
*
* @param string $skype
* @return UserData
*/
public function setSkype($skype)
{
$this->skype = $skype;
return $this;
}
/**
* @var string $phoneNumber
* @ORM\Column(type="string", length=30, name="phone_number", nullable=true)
*/
protected $phoneNumber;
/**
* Get skype
*
* @return string
*/
public function getSkype()
{
return $this->skype;
}
/**
* Set phoneNumber
*
* @param string $phoneNumber
* @return UserData
*/
public function setPhoneNumber($phoneNumber = null)
{
$this->phoneNumber = $phoneNumber;
return $this;
}
/**
* Set skypePublic
*
* @param boolean $skypePublic
* @return UserData
*/
public function setSkypePublic($skypePublic)
{
$this->skypePublic = $skypePublic;
return $this;
}
/**
* Get phoneNumber
*
* @return string
*/
public function getPhoneNumber()
{
return $this->phoneNumber;
}
/**
* Get skypePublic
*
* @return boolean
*/
public function getSkypePublic()
{
return $this->skypePublic;
}
/**
* @var string $phoneNumber
*/
private $phoneNumber;
/**
* @var boolean $phoneNumberPublic
* @ORM\Column(type="boolean", name="phone_number_public", nullable=false)
*/
protected $phoneNumberPublic;
/**
* @var boolean $phoneNumberPublic
*/
private $phoneNumberPublic;
/**
* Set phoneNumberPublic
*
* @param boolean $phoneNumberPublic
* @return UserData
*/
public function setPhoneNumberPublic($phoneNumberPublic)
{
$this->phoneNumberPublic = $phoneNumberPublic;
return $this;
}
/**
* Set phoneNumber
*
* @param string $phoneNumber
* @return UserData
*/
public function setPhoneNumber($phoneNumber)
{
$this->phoneNumber = $phoneNumber;
return $this;
}
/**
* Get phoneNumber
*
* @return string
*/
public function getPhoneNumber()
{
return $this->phoneNumber;
}
/**
* Set phoneNumberPublic
*
* @param boolean $phoneNumberPublic
* @return UserData
*/
public function setPhoneNumberPublic($phoneNumberPublic)
{
$this->phoneNumberPublic = $phoneNumberPublic;
return $this;
}
/**
* Get phoneNumberPublic
*
* @return boolean
*/
public function getPhoneNumberPublic()
{
return $this->phoneNumberPublic;
}
/**
* Get phoneNumberPublic
*
* @return boolean
*/
public function getPhoneNumberPublic()
{
return $this->phoneNumberPublic;
}
}