<?phpnamespace FoundersBundle\Entity;use Doctrine\Common\Collections\ArrayCollection;use Application\Sonata\MediaBundle\Entity\Media;use Doctrine\Common\Collections\Collection;/** * CategoryPost */class CategoryPost{ /** * @var int */ private $id; /** * @var string */ private $title; /** * @var string */ private $url; /** * @var int */ private $position = 0; /** * @var int */ private $state; /** * @var Collection */ private $post; /** * Constructor */ public function __construct() { $this->post = new ArrayCollection(); } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set title. * * @param string $title * * @return CategoryPost */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title. * * @return string */ public function getTitle() { return $this->title; } /** * Set url. * * @param string $url * * @return CategoryPost */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get url. * * @return string */ public function getUrl() { return $this->url; } /** * Set position. * * @param int $position * * @return CategoryPost */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position. * * @return int */ public function getPosition() { return $this->position; } /** * Set state. * * @param int $state * * @return CategoryPost */ public function setState($state) { $this->state = $state; return $this; } /** * Get state. * * @return int */ public function getState() { return $this->state > 0; } /** * Add post. * * @param Post $post * * @return CategoryPost */ public function addPost(Post $post) { $this->post[] = $post; return $this; } /** * Remove post. * * @param Post $post * * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. */ public function removePost(Post $post) { return $this->post->removeElement($post); } /** * Get post. * * @return Collection */ public function getPost() { return $this->post; } public function __toString() { return (string) $this->title; } /** * @var string */ private $description_shot; /** * @var string */ private $description; /** * @var string */ private $source; /** * Set descriptionShot. * * @param string $descriptionShot * * @return CategoryPost */ 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 CategoryPost */ public function setDescription($description) { $this->description = $description; return $this; } /** * Get description. * * @return string */ public function getDescription() { return $this->description; } /** * Set source. * * @param string $source * * @return CategoryPost */ public function setSource($source) { $this->source = $source; return $this; } /** * Get source. * * @return string */ public function getSource() { return $this->source; } /** * @var string|null */ private $seo_title; /** * @var string|null */ private $seo_description; /** * Set seoTitle. * * @param string|null $seoTitle * * @return CategoryPost */ 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 CategoryPost */ public function setSeoDescription($seoDescription = null) { $this->seo_description = $seoDescription; return $this; } /** * Get seoDescription. * * @return string|null */ public function getSeoDescription() { return $this->seo_description; } /** * @var Media */ private $image; /** * Set image. * * @param Media|null $image * * @return CategoryPost */ public function setImage(Media $image = null) { $this->image = $image; return $this; } /** * Get image. * * @return Media|null */ public function getImage() { return $this->image; }}