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