<?phpnamespace FoundersBundle\Entity;use Application\Sonata\MediaBundle\Entity\Media;use DateTime;/** * Post */class Post{ /** * @var int */ private $id; /** * @var string */ private $title; /** * @var string */ private $description_shot; /** * @var string */ private $description; /** * @var string|null */ private $seo_title; /** * @var string|null */ private $seo_description; /** * @var string */ private $url; /** * @var int|null */ private $post_type; /** * @var DateTime */ private $created; /** * @var int */ private $position = 0; /** * @var Media */ private $image_preview; /** * @var Media */ private $image; /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set title. * * @param string $title * * @return Post */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title. * * @return string */ public function getTitle() { return $this->title; } /** * Set descriptionShot. * * @param string $descriptionShot * * @return Post */ public function setDescriptionShot($descriptionShot) { $this->description_shot = $descriptionShot; return $this; } /** * Get descriptionShot. * * @return string */ public function getDescriptionShot() { return $this->description_shot; } /** * Set description. * * @param string $description * * @return Post */ public function setDescription($description) { $this->description = $description; return $this; } /** * Get description. * * @return string */ public function getDescription() { return $this->description; } /** * Set seoTitle. * * @param string|null $seoTitle * * @return Post */ public function setSeoTitle($seoTitle = null) { $this->seo_title = $seoTitle; return $this; } /** * Get seoTitle. * * @return string|null */ public function getSeoTitle() { return $this->seo_title; } /** * Set seoDescription. * * @param string|null $seoDescription * * @return Post */ public function setSeoDescription($seoDescription = null) { $this->seo_description = $seoDescription; return $this; } /** * Get seoDescription. * * @return string|null */ public function getSeoDescription() { return $this->seo_description; } /** * Set url. * * @param string $url * * @return Post */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get url. * * @return string */ public function getUrl() { return $this->url; } /** * Set postType. * * @param int|null $postType * * @return Post */ public function setPostType($postType = null) { $this->post_type = $postType; return $this; } /** * Get postType. * * @return int|null */ public function getPostType() { return $this->post_type; } /** * Set created. * * @param DateTime $created * * @return Post */ public function setCreated($created) { $this->created = $created; return $this; } /** * Get created. * * @return DateTime */ public function getCreated() { return $this->created; } /** * Set position. * * @param int $position * * @return Post */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position. * * @return int */ public function getPosition() { return $this->position; } /** * Set imagePreview. * * @param Media|null $imagePreview * * @return Post */ public function setImagePreview(Media $imagePreview = null) { $this->image_preview = $imagePreview; return $this; } /** * Get imagePreview. * * @return Media|null */ public function getImagePreview() { return $this->image_preview; } /** * Set image. * * @param Media|null $image * * @return Post */ public function setImage(Media $image = null) { $this->image = $image; return $this; } /** * Get image. * * @return Media|null */ public function getImage() { return $this->image; } /** * @var int */ private $state; /** * Set state. * * @param int $state * * @return Post */ public function setState($state) { $this->state = $state; return $this; } /** * Get state. * * @return int */ public function getState() { return $this->state > 0; } /** * @var string */ private $publication_source; /** * Set publicationSource. * * @param string $publicationSource * * @return Post */ public function setPublicationSource($publicationSource) { $this->publication_source = $publicationSource; return $this; } /** * Get publicationSource. * * @return string */ public function getPublicationSource() { return $this->publication_source; } /** * @var CategoryPost */ private $category; /** * Set category. * * @param CategoryPost|null $category * * @return Post */ public function setCategory(CategoryPost $category = null) { $this->category = $category; return $this; } /** * Get category. * * @return CategoryPost|null */ public function getCategory() { return $this->category; } public function getCategoryUrlById() { return \FoundersBundle\Model\Post::getCategoryUrl($this->post_type); } public function getCategoryTitleByTypeId() { return \FoundersBundle\Model\Post::getCategoryTitleByTypeId($this->post_type); }}