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 \Customize\Entity\NewsTrait;
  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 boolean
  92.          *
  93.          * @ORM\Column(name="is_red_title", type="boolean", options={"default":false})
  94.          */
  95.         private $is_red_title false;
  96.         /**
  97.          * @var \Eccube\Entity\Member
  98.          *
  99.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  100.          * @ORM\JoinColumns({
  101.          *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
  102.          * })
  103.          */
  104.         private $Creator;
  105.         /**
  106.          * Get id.
  107.          *
  108.          * @return int
  109.          */
  110.         public function getId()
  111.         {
  112.             return $this->id;
  113.         }
  114.         /**
  115.          * Set publishDate.
  116.          *
  117.          * @param \DateTime|null $publishDate
  118.          *
  119.          * @return News
  120.          */
  121.         public function setPublishDate($publishDate null)
  122.         {
  123.             $this->publish_date $publishDate;
  124.             return $this;
  125.         }
  126.         /**
  127.          * Get publishDate.
  128.          *
  129.          * @return \DateTime|null
  130.          */
  131.         public function getPublishDate()
  132.         {
  133.             return $this->publish_date;
  134.         }
  135.         /**
  136.          * Set title.
  137.          *
  138.          * @param string $title
  139.          *
  140.          * @return News
  141.          */
  142.         public function setTitle($title)
  143.         {
  144.             $this->title $title;
  145.             return $this;
  146.         }
  147.         /**
  148.          * Get title.
  149.          *
  150.          * @return string
  151.          */
  152.         public function getTitle()
  153.         {
  154.             return $this->title;
  155.         }
  156.         /**
  157.          * Set description.
  158.          *
  159.          * @param string|null $description
  160.          *
  161.          * @return News
  162.          */
  163.         public function setDescription($description null)
  164.         {
  165.             $this->description $description;
  166.             return $this;
  167.         }
  168.         /**
  169.          * Get description.
  170.          *
  171.          * @return string|null
  172.          */
  173.         public function getDescription()
  174.         {
  175.             return $this->description;
  176.         }
  177.         /**
  178.          * Set url.
  179.          *
  180.          * @param string|null $url
  181.          *
  182.          * @return News
  183.          */
  184.         public function setUrl($url null)
  185.         {
  186.             $this->url $url;
  187.             return $this;
  188.         }
  189.         /**
  190.          * Get url.
  191.          *
  192.          * @return string|null
  193.          */
  194.         public function getUrl()
  195.         {
  196.             return $this->url;
  197.         }
  198.         /**
  199.          * Set linkMethod.
  200.          *
  201.          * @param boolean $linkMethod
  202.          *
  203.          * @return News
  204.          */
  205.         public function setLinkMethod($linkMethod)
  206.         {
  207.             $this->link_method $linkMethod;
  208.             return $this;
  209.         }
  210.         /**
  211.          * Get linkMethod.
  212.          *
  213.          * @return boolean
  214.          */
  215.         public function isLinkMethod()
  216.         {
  217.             return $this->link_method;
  218.         }
  219.         /**
  220.          * Set createDate.
  221.          *
  222.          * @param \DateTime $createDate
  223.          *
  224.          * @return News
  225.          */
  226.         public function setCreateDate($createDate)
  227.         {
  228.             $this->create_date $createDate;
  229.             return $this;
  230.         }
  231.         /**
  232.          * Get createDate.
  233.          *
  234.          * @return \DateTime
  235.          */
  236.         public function getCreateDate()
  237.         {
  238.             return $this->create_date;
  239.         }
  240.         /**
  241.          * Set updateDate.
  242.          *
  243.          * @param \DateTime $updateDate
  244.          *
  245.          * @return News
  246.          */
  247.         public function setUpdateDate($updateDate)
  248.         {
  249.             $this->update_date $updateDate;
  250.             return $this;
  251.         }
  252.         /**
  253.          * Get updateDate.
  254.          *
  255.          * @return \DateTime
  256.          */
  257.         public function getUpdateDate()
  258.         {
  259.             return $this->update_date;
  260.         }
  261.         /**
  262.          * @return integer
  263.          */
  264.         public function isVisible()
  265.         {
  266.             return $this->visible;
  267.         }
  268.         /**
  269.          * @param boolean $visible
  270.          *
  271.          * @return News
  272.          */
  273.         public function setVisible($visible)
  274.         {
  275.             $this->visible $visible;
  276.             return $this;
  277.         }
  278.         /**
  279.          * Set creator.
  280.          *
  281.          * @param \Eccube\Entity\Member|null $creator
  282.          *
  283.          * @return News
  284.          */
  285.         public function setCreator(Member $creator null)
  286.         {
  287.             $this->Creator $creator;
  288.             return $this;
  289.         }
  290.         /**
  291.          * Get creator.
  292.          *
  293.          * @return \Eccube\Entity\Member|null
  294.          */
  295.         public function getCreator()
  296.         {
  297.             return $this->Creator;
  298.         }
  299.         /**
  300.          * @return boolean
  301.          */
  302.         public function isRedTitle()
  303.         {
  304.             return $this->is_red_title;
  305.         }
  306.         /**
  307.          * @param boolean $isRedTitle
  308.          *
  309.          * @return News
  310.          */
  311.         public function setIsRedTitle($isRedTitle)
  312.         {
  313.             $this->is_red_title $isRedTitle;
  314.             return $this;
  315.         }
  316.     }