src/Notaris/AdminBundle/Entity/NewsParagraph.php line 13

Open in your IDE?
  1. <?php
  2. namespace Notaris\AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass="NewsParagraphRepository")
  8.  * @ORM\Table(name="news_paragraphs")
  9.  */
  10. class NewsParagraph {
  11.     /**
  12.      * @var integer
  13.      *
  14.      * @ORM\Column(name="id", type="integer")
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\News", inversedBy="paragraphs")
  21.      * @ORM\JoinColumn(name="news_id", referencedColumnName="id", onDelete="CASCADE")
  22.      */
  23.     private $news;
  24.     /**
  25.      * @var integer
  26.      *
  27.      * @ORM\Column(type="integer")
  28.      */
  29.     private $number;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="subtitle", type="string", length=255)
  34.      */
  35.     private $subtitle;
  36.     /**
  37.      * @ORM\Column(type="text", name="text")
  38.      */
  39.     private $text;
  40.     /**
  41.      * @ORM\OneToOne(targetEntity="Asset")
  42.      * @ORM\JoinColumn(name="asset_id", referencedColumnName="id")
  43.      */
  44.     private $asset;
  45.     /**
  46.      * Get id
  47.      *
  48.      * @return integer
  49.      */
  50.     public function getId()
  51.     {
  52.         return $this->id;
  53.     }
  54.     /**
  55.      * Set news
  56.      *
  57.      * @param \Notaris\AdminBundle\Entity\News $news
  58.      *
  59.      * @return NewsMailing
  60.      */
  61.     public function setNews(\Notaris\AdminBundle\Entity\News $news = null)
  62.     {
  63.         $this->news = $news;
  64.         return $this;
  65.     }
  66.     /**
  67.      * Get news
  68.      *
  69.      * @return \Notaris\AdminBundle\Entity\News
  70.      */
  71.     public function getNews()
  72.     {
  73.         return $this->news;
  74.     }
  75.     /**
  76.      * Set number
  77.      *
  78.      * @param integer $number
  79.      * @return NewsParagraph
  80.      */
  81.     public function setNumber($number)
  82.     {
  83.         $this->number = $number;
  84.         return $this;
  85.     }
  86.     /**
  87.      * Get number
  88.      *
  89.      * @return integer
  90.      */
  91.     public function getNumber()
  92.     {
  93.         return $this->number;
  94.     }
  95.     /**
  96.      * Set subtitle
  97.      *
  98.      * @param string $subtitle
  99.      * @return News
  100.      */
  101.     public function setSubtitle($subtitle)
  102.     {
  103.         $this->subtitle = $subtitle;
  104.         return $this;
  105.     }
  106.     /**
  107.      * Get subtitle
  108.      *
  109.      * @return string
  110.      */
  111.     public function getSubtitle()
  112.     {
  113.         return $this->subtitle;
  114.     }
  115.     /**
  116.      * Set text
  117.      *
  118.      * @param string $text
  119.      * @return News
  120.      */
  121.     public function setText($text)
  122.     {
  123.         $this->text = $text;
  124.         return $this;
  125.     }
  126.     /**
  127.      * Get text
  128.      *
  129.      * @return string
  130.      */
  131.     public function getText()
  132.     {
  133.         return $this->text;
  134.     }
  135.     /**
  136.      * Set asset
  137.      *
  138.      * @param \Notaris\AdminBundle\Entity\Asset $asset
  139.      * @return News
  140.      */
  141.     public function setAsset(\Notaris\AdminBundle\Entity\Asset $asset = null)
  142.     {
  143.         $this->asset = $asset;
  144.         return $this;
  145.     }
  146.     /**
  147.      * Get asset
  148.      *
  149.      * @return \Notaris\AdminBundle\Entity\Asset
  150.      */
  151.     public function getAsset()
  152.     {
  153.         return $this->asset;
  154.     }
  155. }