app/proxy/entity/src/Eccube/Entity/News.php line 29

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14.     /**
  15.      * News
  16.      *
  17.      * @ORM\Table(name="dtb_news")
  18.      * @ORM\InheritanceType("SINGLE_TABLE")
  19.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  20.      * @ORM\HasLifecycleCallbacks()
  21.      * @ORM\Entity(repositoryClass="Eccube\Repository\NewsRepository")
  22.      * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
  23.      */
  24.     class News extends AbstractEntity
  25.     {
  26.     use \Plugin\NewsPageSelfReliance\Entity\NpsrNewsTrait;
  27.         /**
  28.          * @return string
  29.          */
  30.         public function __toString()
  31.         {
  32.             return (string) $this->getTitle();
  33.         }
  34.         /**
  35.          * @var int
  36.          *
  37.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  38.          * @ORM\Id
  39.          * @ORM\GeneratedValue(strategy="IDENTITY")
  40.          */
  41.         private $id;
  42.         /**
  43.          * @var \DateTime|null
  44.          *
  45.          * @ORM\Column(name="publish_date", type="datetimetz", nullable=true)
  46.          */
  47.         private $publish_date;
  48.         /**
  49.          * @var string
  50.          *
  51.          * @ORM\Column(name="title", type="string", length=255)
  52.          */
  53.         private $title;
  54.         /**
  55.          * @var string|null
  56.          *
  57.          * @ORM\Column(name="description", type="text", nullable=true)
  58.          */
  59.         private $description;
  60.         /**
  61.          * @var string|null
  62.          *
  63.          * @ORM\Column(name="url", type="string", length=4000, nullable=true)
  64.          */
  65.         private $url;
  66.         /**
  67.          * @var boolean
  68.          *
  69.          * @ORM\Column(name="link_method", type="boolean", options={"default":false})
  70.          */
  71.         private $link_method false;
  72.         /**
  73.          * @var \DateTime
  74.          *
  75.          * @ORM\Column(name="create_date", type="datetimetz")
  76.          */
  77.         private $create_date;
  78.         /**
  79.          * @var \DateTime
  80.          *
  81.          * @ORM\Column(name="update_date", type="datetimetz")
  82.          */
  83.         private $update_date;
  84.         /**
  85.          * @var boolean
  86.          *
  87.          * @ORM\Column(name="visible", type="boolean", options={"default":true})
  88.          */
  89.         private $visible;
  90.         /**
  91.          * @var \Eccube\Entity\Member
  92.          *
  93.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  94.          * @ORM\JoinColumns({
  95.          *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
  96.          * })
  97.          */
  98.         private $Creator;
  99.         /**
  100.          * Get id.
  101.          *
  102.          * @return int
  103.          */
  104.         public function getId()
  105.         {
  106.             return $this->id;
  107.         }
  108.         /**
  109.          * Set publishDate.
  110.          *
  111.          * @param \DateTime|null $publishDate
  112.          *
  113.          * @return News
  114.          */
  115.         public function setPublishDate($publishDate null)
  116.         {
  117.             $this->publish_date $publishDate;
  118.             return $this;
  119.         }
  120.         /**
  121.          * Get publishDate.
  122.          *
  123.          * @return \DateTime|null
  124.          */
  125.         public function getPublishDate()
  126.         {
  127.             return $this->publish_date;
  128.         }
  129.         /**
  130.          * Set title.
  131.          *
  132.          * @param string $title
  133.          *
  134.          * @return News
  135.          */
  136.         public function setTitle($title)
  137.         {
  138.             $this->title $title;
  139.             return $this;
  140.         }
  141.         /**
  142.          * Get title.
  143.          *
  144.          * @return string
  145.          */
  146.         public function getTitle()
  147.         {
  148.             return $this->title;
  149.         }
  150.         /**
  151.          * Set description.
  152.          *
  153.          * @param string|null $description
  154.          *
  155.          * @return News
  156.          */
  157.         public function setDescription($description null)
  158.         {
  159.             $this->description $description;
  160.             return $this;
  161.         }
  162.         /**
  163.          * Get description.
  164.          *
  165.          * @return string|null
  166.          */
  167.         public function getDescription()
  168.         {
  169.             return $this->description;
  170.         }
  171.         /**
  172.          * Set url.
  173.          *
  174.          * @param string|null $url
  175.          *
  176.          * @return News
  177.          */
  178.         public function setUrl($url null)
  179.         {
  180.             $this->url $url;
  181.             return $this;
  182.         }
  183.         /**
  184.          * Get url.
  185.          *
  186.          * @return string|null
  187.          */
  188.         public function getUrl()
  189.         {
  190.             return $this->url;
  191.         }
  192.         /**
  193.          * Set linkMethod.
  194.          *
  195.          * @param boolean $linkMethod
  196.          *
  197.          * @return News
  198.          */
  199.         public function setLinkMethod($linkMethod)
  200.         {
  201.             $this->link_method $linkMethod;
  202.             return $this;
  203.         }
  204.         /**
  205.          * Get linkMethod.
  206.          *
  207.          * @return boolean
  208.          */
  209.         public function isLinkMethod()
  210.         {
  211.             return $this->link_method;
  212.         }
  213.         /**
  214.          * Set createDate.
  215.          *
  216.          * @param \DateTime $createDate
  217.          *
  218.          * @return News
  219.          */
  220.         public function setCreateDate($createDate)
  221.         {
  222.             $this->create_date $createDate;
  223.             return $this;
  224.         }
  225.         /**
  226.          * Get createDate.
  227.          *
  228.          * @return \DateTime
  229.          */
  230.         public function getCreateDate()
  231.         {
  232.             return $this->create_date;
  233.         }
  234.         /**
  235.          * Set updateDate.
  236.          *
  237.          * @param \DateTime $updateDate
  238.          *
  239.          * @return News
  240.          */
  241.         public function setUpdateDate($updateDate)
  242.         {
  243.             $this->update_date $updateDate;
  244.             return $this;
  245.         }
  246.         /**
  247.          * Get updateDate.
  248.          *
  249.          * @return \DateTime
  250.          */
  251.         public function getUpdateDate()
  252.         {
  253.             return $this->update_date;
  254.         }
  255.         /**
  256.          * @return integer
  257.          */
  258.         public function isVisible()
  259.         {
  260.             return $this->visible;
  261.         }
  262.         /**
  263.          * @param boolean $visible
  264.          *
  265.          * @return News
  266.          */
  267.         public function setVisible($visible)
  268.         {
  269.             $this->visible $visible;
  270.             return $this;
  271.         }
  272.         /**
  273.          * Set creator.
  274.          *
  275.          * @param \Eccube\Entity\Member|null $creator
  276.          *
  277.          * @return News
  278.          */
  279.         public function setCreator(Member $creator null)
  280.         {
  281.             $this->Creator $creator;
  282.             return $this;
  283.         }
  284.         /**
  285.          * Get creator.
  286.          *
  287.          * @return \Eccube\Entity\Member|null
  288.          */
  289.         public function getCreator()
  290.         {
  291.             return $this->Creator;
  292.         }
  293.     }