src/FoundersBundle/Entity/CategoryPost.php line 12

Open in your IDE?
  1. <?php
  2. namespace FoundersBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Application\Sonata\MediaBundle\Entity\Media;
  5. use Doctrine\Common\Collections\Collection;
  6. /**
  7.  * CategoryPost
  8.  */
  9. class CategoryPost
  10. {
  11.     /**
  12.      * @var int
  13.      */
  14.     private $id;
  15.     /**
  16.      * @var string
  17.      */
  18.     private $title;
  19.     /**
  20.      * @var string
  21.      */
  22.     private $url;
  23.     /**
  24.      * @var int
  25.      */
  26.     private $position 0;
  27.     /**
  28.      * @var int
  29.      */
  30.     private $state;
  31.     /**
  32.      * @var Collection
  33.      */
  34.     private $post;
  35.     /**
  36.      * Constructor
  37.      */
  38.     public function __construct()
  39.     {
  40.         $this->post = new ArrayCollection();
  41.     }
  42.     /**
  43.      * Get id.
  44.      *
  45.      * @return int
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * Set title.
  53.      *
  54.      * @param string $title
  55.      *
  56.      * @return CategoryPost
  57.      */
  58.     public function setTitle($title)
  59.     {
  60.         $this->title $title;
  61.         return $this;
  62.     }
  63.     /**
  64.      * Get title.
  65.      *
  66.      * @return string
  67.      */
  68.     public function getTitle()
  69.     {
  70.         return $this->title;
  71.     }
  72.     /**
  73.      * Set url.
  74.      *
  75.      * @param string $url
  76.      *
  77.      * @return CategoryPost
  78.      */
  79.     public function setUrl($url)
  80.     {
  81.         $this->url $url;
  82.         return $this;
  83.     }
  84.     /**
  85.      * Get url.
  86.      *
  87.      * @return string
  88.      */
  89.     public function getUrl()
  90.     {
  91.         return $this->url;
  92.     }
  93.     /**
  94.      * Set position.
  95.      *
  96.      * @param int $position
  97.      *
  98.      * @return CategoryPost
  99.      */
  100.     public function setPosition($position)
  101.     {
  102.         $this->position $position;
  103.         return $this;
  104.     }
  105.     /**
  106.      * Get position.
  107.      *
  108.      * @return int
  109.      */
  110.     public function getPosition()
  111.     {
  112.         return $this->position;
  113.     }
  114.     /**
  115.      * Set state.
  116.      *
  117.      * @param int $state
  118.      *
  119.      * @return CategoryPost
  120.      */
  121.     public function setState($state)
  122.     {
  123.         $this->state $state;
  124.         return $this;
  125.     }
  126.     /**
  127.      * Get state.
  128.      *
  129.      * @return int
  130.      */
  131.     public function getState()
  132.     {
  133.         return $this->state 0;
  134.     }
  135.     /**
  136.      * Add post.
  137.      *
  138.      * @param Post $post
  139.      *
  140.      * @return CategoryPost
  141.      */
  142.     public function addPost(Post $post)
  143.     {
  144.         $this->post[] = $post;
  145.         return $this;
  146.     }
  147.     /**
  148.      * Remove post.
  149.      *
  150.      * @param Post $post
  151.      *
  152.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  153.      */
  154.     public function removePost(Post $post)
  155.     {
  156.         return $this->post->removeElement($post);
  157.     }
  158.     /**
  159.      * Get post.
  160.      *
  161.      * @return Collection
  162.      */
  163.     public function getPost()
  164.     {
  165.         return $this->post;
  166.     }
  167.     public function __toString()
  168.     {
  169.         return (string) $this->title;
  170.     }
  171.     /**
  172.      * @var string
  173.      */
  174.     private $description_shot;
  175.     /**
  176.      * @var string
  177.      */
  178.     private $description;
  179.     /**
  180.      * @var string
  181.      */
  182.     private $source;
  183.     /**
  184.      * Set descriptionShot.
  185.      *
  186.      * @param string $descriptionShot
  187.      *
  188.      * @return CategoryPost
  189.      */
  190.     public function setDescriptionShot($descriptionShot)
  191.     {
  192.         $this->description_shot $descriptionShot;
  193.         return $this;
  194.     }
  195.     /**
  196.      * Get descriptionShot.
  197.      *
  198.      * @return string
  199.      */
  200.     public function getDescriptionShot()
  201.     {
  202.         return $this->description_shot;
  203.     }
  204.     /**
  205.      * Set description.
  206.      *
  207.      * @param string $description
  208.      *
  209.      * @return CategoryPost
  210.      */
  211.     public function setDescription($description)
  212.     {
  213.         $this->description $description;
  214.         return $this;
  215.     }
  216.     /**
  217.      * Get description.
  218.      *
  219.      * @return string
  220.      */
  221.     public function getDescription()
  222.     {
  223.         return $this->description;
  224.     }
  225.     /**
  226.      * Set source.
  227.      *
  228.      * @param string $source
  229.      *
  230.      * @return CategoryPost
  231.      */
  232.     public function setSource($source)
  233.     {
  234.         $this->source $source;
  235.         return $this;
  236.     }
  237.     /**
  238.      * Get source.
  239.      *
  240.      * @return string
  241.      */
  242.     public function getSource()
  243.     {
  244.         return $this->source;
  245.     }
  246.     /**
  247.      * @var string|null
  248.      */
  249.     private $seo_title;
  250.     /**
  251.      * @var string|null
  252.      */
  253.     private $seo_description;
  254.     /**
  255.      * Set seoTitle.
  256.      *
  257.      * @param string|null $seoTitle
  258.      *
  259.      * @return CategoryPost
  260.      */
  261.     public function setSeoTitle($seoTitle null)
  262.     {
  263.         $this->seo_title $seoTitle;
  264.         return $this;
  265.     }
  266.     /**
  267.      * Get seoTitle.
  268.      *
  269.      * @return string|null
  270.      */
  271.     public function getSeoTitle()
  272.     {
  273.         return $this->seo_title;
  274.     }
  275.     /**
  276.      * Set seoDescription.
  277.      *
  278.      * @param string|null $seoDescription
  279.      *
  280.      * @return CategoryPost
  281.      */
  282.     public function setSeoDescription($seoDescription null)
  283.     {
  284.         $this->seo_description $seoDescription;
  285.         return $this;
  286.     }
  287.     /**
  288.      * Get seoDescription.
  289.      *
  290.      * @return string|null
  291.      */
  292.     public function getSeoDescription()
  293.     {
  294.         return $this->seo_description;
  295.     }
  296.     /**
  297.      * @var Media
  298.      */
  299.     private $image;
  300.     /**
  301.      * Set image.
  302.      *
  303.      * @param Media|null $image
  304.      *
  305.      * @return CategoryPost
  306.      */
  307.     public function setImage(Media $image null)
  308.     {
  309.         $this->image $image;
  310.         return $this;
  311.     }
  312.     /**
  313.      * Get image.
  314.      *
  315.      * @return Media|null
  316.      */
  317.     public function getImage()
  318.     {
  319.         return $this->image;
  320.     }
  321. }