vendor/fri0z/mldev-base-bundle/src/Entity/PageContent.php line 15

Open in your IDE?
  1. <?php
  2. namespace MLDev\BaseBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * PageContent
  6.  *
  7.  * @ORM\Table(name="MLDev_Page_Content")
  8.  * @ORM\Entity(repositoryClass="MLDev\BaseBundle\Repository\PageContentRepository")
  9.  * @ORM\HasLifecycleCallbacks()
  10.  *
  11.  */
  12. class PageContent
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="title", type="string", length=255)
  26.      */
  27.     private $title;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="priority", type="integer", length=255)
  32.      */
  33.     private $priority;
  34.     /**
  35.      * @var bool
  36.      *
  37.      * @ORM\Column(name="is_active", type="boolean", nullable=true)
  38.      */
  39.     private $isActive true;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="widget", type="string", length=255)
  44.      */
  45.     private $widget;
  46.     /**
  47.      * @var array
  48.      *
  49.      * @ORM\Column(name="options", type="json", nullable=true)
  50.      */
  51.     private $options = [];
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity=Page::class, inversedBy="pageContents", fetch="EXTRA_LAZY")
  54.      * @ORM\JoinColumn(onDelete="CASCADE")
  55.      */
  56.     protected $page;
  57.     /**
  58.      * Clone method
  59.      */
  60.     public function __clone()
  61.     {
  62.         if($this->id) {
  63.             $this->id null;
  64.         }
  65.     }
  66.     /**
  67.      * Get id
  68.      *
  69.      * @return int
  70.      */
  71.     public function getId()
  72.     {
  73.         return $this->id;
  74.     }
  75.     /**
  76.      * Set title
  77.      *
  78.      * @param string $title
  79.      *
  80.      * @return PageContent
  81.      */
  82.     public function setTitle($title)
  83.     {
  84.         $this->title $title;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get title
  89.      *
  90.      * @return string
  91.      */
  92.     public function getTitle()
  93.     {
  94.         return $this->title;
  95.     }
  96.     /**
  97.      * Set priority
  98.      *
  99.      * @param string $priority
  100.      *
  101.      * @return PageContent
  102.      */
  103.     public function setPriority($priority)
  104.     {
  105.         $this->priority $priority;
  106.         return $this;
  107.     }
  108.     /**
  109.      * Get priority
  110.      *
  111.      * @return string
  112.      */
  113.     public function getPriority()
  114.     {
  115.         return $this->priority;
  116.     }
  117.     /**
  118.      * Set isActive
  119.      *
  120.      * @param boolean $isActive
  121.      *
  122.      * @return PageContent
  123.      */
  124.     public function setIsActive($isActive)
  125.     {
  126.         $this->isActive $isActive;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get isActive
  131.      *
  132.      * @return bool
  133.      */
  134.     public function getIsActive()
  135.     {
  136.         return $this->isActive;
  137.     }
  138.     /**
  139.      * Set widget
  140.      *
  141.      * @param string $widget
  142.      *
  143.      * @return PageContent
  144.      */
  145.     public function setWidget($widget)
  146.     {
  147.         $this->widget $widget;
  148.         return $this;
  149.     }
  150.     /**
  151.      * Get widget
  152.      *
  153.      * @return string
  154.      */
  155.     public function getWidget()
  156.     {
  157.         return $this->widget;
  158.     }
  159.     /**
  160.      * Set options
  161.      *
  162.      * @param array $options
  163.      *
  164.      * @return PageContent
  165.      */
  166.     public function setOptions($options)
  167.     {
  168.         $this->options $options;
  169.         return $this;
  170.     }
  171.     /**
  172.      * Get options
  173.      *
  174.      * @return array
  175.      */
  176.     public function getOptions()
  177.     {
  178.         return ($this->options $this->options : []);
  179.     }
  180.     /**
  181.      * @return mixed
  182.      */
  183.     public function getPage()
  184.     {
  185.         return $this->page;
  186.     }
  187.     /**
  188.      * @param mixed $page
  189.      */
  190.     public function setPage($page)
  191.     {
  192.         $this->page $page;
  193.     }
  194. }