app/Plugin/Blogs42/Entity/Blogs.php line 17

Open in your IDE?
  1. <?php
  2. namespace Plugin\Blogs42\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Eccube\Entity\Member;
  5. if (!class_exists('\Plugin\Blogs42\Entity\Blogs')) {
  6.   /**
  7.    * Blogs42
  8.    *
  9.    * @ORM\Table(name="plg_blogs")
  10.    * @ORM\InheritanceType("SINGLE_TABLE")
  11.    * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  12.    * @ORM\HasLifecycleCallbacks()
  13.    * @ORM\Entity(repositoryClass="Plugin\Blogs42\Repository\BlogsRepository")
  14.    */
  15.   class Blogs extends \Eccube\Entity\AbstractEntity
  16.   {
  17.     /**
  18.      * @return string
  19.      */
  20.     public function __toString()
  21.     {
  22.         return (string) $this->getTitle();
  23.     }
  24.     /**
  25.      * @var int
  26.      *
  27.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  28.      * @ORM\Id
  29.      * @ORM\GeneratedValue(strategy="IDENTITY")
  30.      */
  31.     private $id;
  32.     /**
  33.      * @var \DateTime|null
  34.      *
  35.      * @ORM\Column(name="publish_date", type="datetimetz", nullable=true)
  36.      */
  37.     private $publish_date;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="title", type="string", length=255)
  42.      */
  43.     private $title;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="eyecatch_image", type="text", nullable=true)
  48.      */
  49.     private $eyecatch_image;
  50.     /**
  51.      * @var string|null
  52.      *
  53.      * @ORM\Column(name="blog_description", type="text", nullable=true)
  54.      */
  55.     private $blog_description;
  56.     /**
  57.      * @var string|null
  58.      *
  59.      * @ORM\Column(name="url", type="string", length=4000, nullable=true)
  60.      */
  61.     private $url;
  62.     /**
  63.      * @var boolean
  64.      *
  65.      * @ORM\Column(name="link_method", type="boolean", options={"default":false})
  66.      */
  67.     private $link_method false;
  68.     /**
  69.      * @var \DateTime
  70.      *
  71.      * @ORM\Column(name="create_date", type="datetimetz")
  72.      */
  73.     private $create_date;
  74.     /**
  75.      * @var \DateTime
  76.      *
  77.      * @ORM\Column(name="update_date", type="datetimetz")
  78.      */
  79.     private $update_date;
  80.     /**
  81.      * @var \Doctrine\Common\Collections\Collection
  82.      *
  83.      * @ORM\OneToMany(targetEntity="Plugin\Blogs42\Entity\BlogsCategory", mappedBy="Blogs", cascade={"persist","remove"})
  84.      */
  85.     private $BlogsCategories;
  86.     /**
  87.      * @var boolean
  88.      *
  89.      * @ORM\Column(name="visible", type="boolean", options={"default":true})
  90.      */
  91.     private $visible;
  92.     /**
  93.      * @var \Eccube\Entity\Member
  94.      *
  95.      * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  96.      * @ORM\JoinColumns({
  97.      *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
  98.      * })
  99.      */
  100.     private $Creator;
  101.     /**
  102.      * @var string|null
  103.      *
  104.      * @ORM\Column(name="author", type="string", length=255, nullable=true)
  105.      */
  106.     private $author;
  107.     /**
  108.      * @var string|null
  109.      *
  110.      * @ORM\Column(name="description", type="string", length=255, nullable=true)
  111.      */
  112.     private $description;
  113.     /**
  114.      * @var string|null
  115.      *
  116.      * @ORM\Column(name="keyword", type="string", length=255, nullable=true)
  117.      */
  118.     private $keyword;
  119.     /**
  120.      * @var string|null
  121.      *
  122.      * @ORM\Column(name="meta_robots", type="string", length=255, nullable=true)
  123.      */
  124.     private $meta_robots;
  125.     /**
  126.      * @var string|null
  127.      *
  128.      * @ORM\Column(name="meta_tags", type="string", length=4000, nullable=true)
  129.      */
  130.     private $meta_tags;
  131.     /**
  132.      * Constructor
  133.      */
  134.     public function __construct()
  135.     {
  136.         $this->BlogsCategories = new \Doctrine\Common\Collections\ArrayCollection();
  137.     }
  138.     /**
  139.      * Get id.
  140.      *
  141.      * @return int
  142.      */
  143.     public function getId()
  144.     {
  145.         return $this->id;
  146.     }
  147.     /**
  148.      * Set publishDate.
  149.      *
  150.      * @param \DateTime|null $publishDate
  151.      *
  152.      * @return Blogs
  153.      */
  154.     public function setPublishDate($publishDate null)
  155.     {
  156.         $this->publish_date $publishDate;
  157.         return $this;
  158.     }
  159.     /**
  160.      * Get publishDate.
  161.      *
  162.      * @return \DateTime|null
  163.      */
  164.     public function getPublishDate()
  165.     {
  166.         return $this->publish_date;
  167.     }
  168.     /**
  169.      * Set title.
  170.      *
  171.      * @param string $title
  172.      *
  173.      * @return Blogs
  174.      */
  175.     public function setTitle($title)
  176.     {
  177.         $this->title $title;
  178.         return $this;
  179.     }
  180.     /**
  181.      * Get title.
  182.      *
  183.      * @return string
  184.      */
  185.     public function getTitle()
  186.     {
  187.         return $this->title;
  188.     }
  189.     /**
  190.      * Set eyecatchImage.
  191.      *
  192.      * @param string|null $eyecatchImage
  193.      *
  194.      * @return Blogs
  195.      */
  196.     public function setEyecatchImage($eyecatchImage null)
  197.     {
  198.         $this->eyecatch_image $eyecatchImage;
  199.         return $this;
  200.     }
  201.     /**
  202.      * Get eyecatchImage.
  203.      *
  204.      * @return string|null
  205.      */
  206.     public function getEyecatchImage()
  207.     {
  208.         return $this->eyecatch_image;
  209.     }
  210.     /**
  211.      * Set blog_description.
  212.      *
  213.      * @param string|null $blog_description
  214.      *
  215.      * @return Blogs
  216.      */
  217.     public function setBlogDescription($blog_description null)
  218.     {
  219.         $this->blog_description $blog_description;
  220.         return $this;
  221.     }
  222.     /**
  223.      * Get blog_description.
  224.      *
  225.      * @return string|null
  226.      */
  227.     public function getBlogDescription()
  228.     {
  229.         return $this->blog_description;
  230.     }
  231.     /**
  232.      * Set url.
  233.      *
  234.      * @param string|null $url
  235.      *
  236.      * @return Blogs
  237.      */
  238.     public function setUrl($url null)
  239.     {
  240.         $this->url $url;
  241.         return $this;
  242.     }
  243.     /**
  244.      * Get url.
  245.      *
  246.      * @return string|null
  247.      */
  248.     public function getUrl()
  249.     {
  250.         return $this->url;
  251.     }
  252.     /**
  253.      * Set linkMethod.
  254.      *
  255.      * @param boolean $linkMethod
  256.      *
  257.      * @return Blogs
  258.      */
  259.     public function setLinkMethod($linkMethod)
  260.     {
  261.         $this->link_method $linkMethod;
  262.         return $this;
  263.     }
  264.     /**
  265.      * Get linkMethod.
  266.      *
  267.      * @return boolean
  268.      */
  269.     public function isLinkMethod()
  270.     {
  271.         return $this->link_method;
  272.     }
  273.     /**
  274.      * Set createDate.
  275.      *
  276.      * @param \DateTime $createDate
  277.      *
  278.      * @return Blogs
  279.      */
  280.     public function setCreateDate($createDate)
  281.     {
  282.         $this->create_date $createDate;
  283.         return $this;
  284.     }
  285.     /**
  286.      * Get createDate.
  287.      *
  288.      * @return \DateTime
  289.      */
  290.     public function getCreateDate()
  291.     {
  292.         return $this->create_date;
  293.     }
  294.     /**
  295.      * Set updateDate.
  296.      *
  297.      * @param \DateTime $updateDate
  298.      *
  299.      * @return Blogs
  300.      */
  301.     public function setUpdateDate($updateDate)
  302.     {
  303.         $this->update_date $updateDate;
  304.         return $this;
  305.     }
  306.     /**
  307.      * Get updateDate.
  308.      *
  309.      * @return \DateTime
  310.      */
  311.     public function getUpdateDate()
  312.     {
  313.         return $this->update_date;
  314.     }
  315.     /**
  316.      * @return integer
  317.      */
  318.     public function isVisible()
  319.     {
  320.         return $this->visible;
  321.     }
  322.     /**
  323.      * @param boolean $visible
  324.      *
  325.      * @return Blogs
  326.      */
  327.     public function setVisible($visible)
  328.     {
  329.         $this->visible $visible;
  330.         return $this;
  331.     }
  332.     /**
  333.      * Set creator.
  334.      *
  335.      * @param \Eccube\Entity\Member|null $creator
  336.      *
  337.      * @return Blogs
  338.      */
  339.     public function setCreator(\Eccube\Entity\Member $creator null)
  340.     {
  341.         $this->Creator $creator;
  342.         return $this;
  343.     }
  344.     /**
  345.      * Get creator.
  346.      *
  347.      * @return \Eccube\Entity\Member|null
  348.      */
  349.     public function getCreator()
  350.     {
  351.         return $this->Creator;
  352.     }
  353.     /**
  354.      * Add blogsCategory.
  355.      *
  356.      * @param \Plugin\Blogs42\Entity\BlogsCategory $blogsCategory
  357.      *
  358.      * @return Blogs
  359.      */
  360.     public function addBlogsCategory(BlogsCategory $blogsCategory)
  361.     {
  362.         $this->BlogsCategories[] = $blogsCategory;
  363.         return $this;
  364.     }
  365.     /**
  366.      * Remove blogsCategory.
  367.      *
  368.      * @param \Plugin\Blogs42\Entity\BlogsCategory $blogsCategory
  369.      *
  370.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  371.      */
  372.     public function removeBlogsCategory(BlogsCategory $blogsCategory)
  373.     {
  374.         return $this->BlogsCategories->removeElement($blogsCategory);
  375.     }
  376.     /**
  377.      * Get blogsCategories.
  378.      *
  379.      * @return \Doctrine\Common\Collections\Collection
  380.      */
  381.     public function getBlogsCategories()
  382.     {
  383.         return $this->BlogsCategories;
  384.     }
  385.         /**
  386.          * Set author.
  387.          *
  388.          * @param string|null $author
  389.          *
  390.          * @return Page
  391.          */
  392.         public function setAuthor($author null)
  393.         {
  394.             $this->author $author;
  395.             return $this;
  396.         }
  397.         /**
  398.          * Get author.
  399.          *
  400.          * @return string|null
  401.          */
  402.         public function getAuthor()
  403.         {
  404.             return $this->author;
  405.         }
  406.         /**
  407.          * Set description.
  408.          *
  409.          * @param string|null $description
  410.          *
  411.          * @return Page
  412.          */
  413.         public function setDescription($description null)
  414.         {
  415.             $this->description $description;
  416.             return $this;
  417.         }
  418.         /**
  419.          * Get description.
  420.          *
  421.          * @return string|null
  422.          */
  423.         public function getDescription()
  424.         {
  425.             return $this->description;
  426.         }
  427.         /**
  428.          * Set keyword.
  429.          *
  430.          * @param string|null $keyword
  431.          *
  432.          * @return Page
  433.          */
  434.         public function setKeyword($keyword null)
  435.         {
  436.             $this->keyword $keyword;
  437.             return $this;
  438.         }
  439.         /**
  440.          * Get keyword.
  441.          *
  442.          * @return string|null
  443.          */
  444.         public function getKeyword()
  445.         {
  446.             return $this->keyword;
  447.         }
  448.         /**
  449.          * Set metaRobots.
  450.          *
  451.          * @param string|null $metaRobots
  452.          *
  453.          * @return Page
  454.          */
  455.         public function setMetaRobots($metaRobots null)
  456.         {
  457.             $this->meta_robots $metaRobots;
  458.             return $this;
  459.         }
  460.         /**
  461.          * Get metaRobots.
  462.          *
  463.          * @return string|null
  464.          */
  465.         public function getMetaRobots()
  466.         {
  467.             return $this->meta_robots;
  468.         }
  469.         /**
  470.          * Set meta_tags
  471.          *
  472.          * @param string $metaTags
  473.          *
  474.          * @return Page
  475.          */
  476.         public function setMetaTags($metaTags)
  477.         {
  478.             $this->meta_tags $metaTags;
  479.             return $this;
  480.         }
  481.         /**
  482.          * Get meta_tags
  483.          *
  484.          * @return string
  485.          */
  486.         public function getMetaTags()
  487.         {
  488.             return $this->meta_tags;
  489.         }
  490.   }
  491. }