src/Entity/Gos/StaticPage.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Entity\Gos\Uniqskills\Course;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * StaticPage
  8.  *
  9.  * @ORM\Table(name="static_page")
  10.  * @ORM\Entity(repositoryClass="App\Repository\StaticPageRepository")
  11.  */
  12. class StaticPage
  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 bool
  24.      *
  25.      * @ORM\Column(type="boolean", nullable=true)
  26.      */
  27.     private $isActive;
  28.     /**
  29.      * @ORM\Column(type="integer", nullable=true)
  30.      */
  31.     private $itemOrder;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(name="title", type="string", length=255)
  36.      */
  37.     private $title;
  38.     /**
  39.      * @Gedmo\Slug(fields={"title"})
  40.      * @ORM\Column(unique=true)
  41.      */
  42.     private $slug;
  43.     /**
  44.      * @ORM\Column(type="string")
  45.      */
  46.     private $type;
  47.     /**
  48.      * @ORM\Column(type="text", nullable=true)
  49.      */
  50.     private $body;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\PortalSettings", inversedBy="staticPage")
  53.      * @ORM\JoinColumn()
  54.      */
  55.     private $portalSettings;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="Language", fetch="EAGER")
  58.      * @ORM\JoinColumn(name="language_id", referencedColumnName="id")
  59.      */
  60.     private $language;
  61.     /**
  62.      * @ORM\ManyToOne(targetEntity="Category", inversedBy="staticPages")
  63.      */
  64.     private $category;
  65.     /**
  66.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Uniqskills\Course", inversedBy="staticPage")
  67.      * @ORM\JoinColumn()
  68.      */
  69.     private $course;
  70.     /**
  71.      * @ORM\Column(type="boolean", nullable=true)
  72.      */
  73.     private $showOnMainPage;
  74.     /**
  75.      * @ORM\Column(type="boolean", nullable=true)
  76.      */
  77.     private $showInBoxList;
  78.     /**
  79.      * @ORM\Column(type="text", nullable=true)
  80.      */
  81.     private $metaTitle;
  82.     /**
  83.      * @ORM\Column(type="text", nullable=true)
  84.      */
  85.     private $metaDescription;
  86.     /**
  87.      * @ORM\Column(type="datetime", nullable=true)
  88.      */
  89.     private $createdAt;
  90.     /**
  91.      * @ORM\Column(type="datetime", nullable=true)
  92.      */
  93.     private $updatedAt;
  94.     public function __construct()
  95.     {
  96.     }
  97.     /** @ORM\PrePersist() */
  98.     public function prePersist()
  99.     {
  100.         $this->createdAt = new \DateTime();
  101.     }
  102.     /** @ORM\PreUpdate() */
  103.     public function preUpdate()
  104.     {
  105.         $this->updatedAt = new \DateTime();
  106.     }
  107.     public function __toString()
  108.     {
  109.         return (string)$this->title;
  110.     }
  111.     /**
  112.      * Get id
  113.      *
  114.      * @return int
  115.      */
  116.     public function getId()
  117.     {
  118.         return $this->id;
  119.     }
  120.     /**
  121.      * Set name
  122.      *
  123.      * @param string $name
  124.      *
  125.      * @return StaticPage
  126.      */
  127.     public function setName($name)
  128.     {
  129.         $this->name $name;
  130.         return $this;
  131.     }
  132.     /**
  133.      * Get name
  134.      *
  135.      * @return string
  136.      */
  137.     public function getName()
  138.     {
  139.         return $this->name;
  140.     }
  141.     /**
  142.      * Set title
  143.      *
  144.      * @param string $title
  145.      *
  146.      * @return StaticPage
  147.      */
  148.     public function setTitle($title)
  149.     {
  150.         $this->title $title;
  151.         return $this;
  152.     }
  153.     /**
  154.      * Get title
  155.      *
  156.      * @return string
  157.      */
  158.     public function getTitle()
  159.     {
  160.         return $this->title;
  161.     }
  162.     /**
  163.      * Set slug
  164.      *
  165.      * @param string $slug
  166.      *
  167.      * @return StaticPage
  168.      */
  169.     public function setSlug($slug)
  170.     {
  171.         $this->slug $slug;
  172.         return $this;
  173.     }
  174.     /**
  175.      * Get slug
  176.      *
  177.      * @return string
  178.      */
  179.     public function getSlug()
  180.     {
  181.         return $this->slug;
  182.     }
  183.     /**
  184.      * Set body
  185.      *
  186.      * @param string $body
  187.      *
  188.      * @return StaticPage
  189.      */
  190.     public function setBody($body)
  191.     {
  192.         $this->body $body;
  193.         return $this;
  194.     }
  195.     /**
  196.      * Get body
  197.      *
  198.      * @return string
  199.      */
  200.     public function getBody()
  201.     {
  202.         return $this->body;
  203.     }
  204.     /**
  205.      * Set createdAt
  206.      *
  207.      * @param \DateTime $createdAt
  208.      *
  209.      * @return StaticPage
  210.      */
  211.     public function setCreatedAt($createdAt)
  212.     {
  213.         $this->createdAt $createdAt;
  214.         return $this;
  215.     }
  216.     /**
  217.      * Get createdAt
  218.      *
  219.      * @return \DateTime
  220.      */
  221.     public function getCreatedAt()
  222.     {
  223.         return $this->createdAt;
  224.     }
  225.     /**
  226.      * Set updatedAt
  227.      *
  228.      * @param \DateTime $updatedAt
  229.      *
  230.      * @return StaticPage
  231.      */
  232.     public function setUpdatedAt($updatedAt)
  233.     {
  234.         $this->updatedAt $updatedAt;
  235.         return $this;
  236.     }
  237.     /**
  238.      * Get updatedAt
  239.      *
  240.      * @return \DateTime
  241.      */
  242.     public function getUpdatedAt()
  243.     {
  244.         return $this->updatedAt;
  245.     }
  246.     public function getIsActive(): ?bool
  247.     {
  248.         return $this->isActive;
  249.     }
  250.     public function setIsActive(?bool $isActive): self
  251.     {
  252.         $this->isActive $isActive;
  253.         return $this;
  254.     }
  255.     public function getPortalSettings(): ?PortalSettings
  256.     {
  257.         return $this->portalSettings;
  258.     }
  259.     public function setPortalSettings(?PortalSettings $portalSettings): self
  260.     {
  261.         $this->portalSettings $portalSettings;
  262.         return $this;
  263.     }
  264.     public function getShowOnMainPage(): ?bool
  265.     {
  266.         return $this->showOnMainPage;
  267.     }
  268.     public function setShowOnMainPage(?bool $showOnMainPage): self
  269.     {
  270.         $this->showOnMainPage $showOnMainPage;
  271.         return $this;
  272.     }
  273.     public function getShowInBoxList(): ?bool
  274.     {
  275.         return $this->showInBoxList;
  276.     }
  277.     public function setShowInBoxList(?bool $showInBoxList): self
  278.     {
  279.         $this->showInBoxList $showInBoxList;
  280.         return $this;
  281.     }
  282.     public function getMetaTitle(): ?string
  283.     {
  284.         return $this->metaTitle;
  285.     }
  286.     public function setMetaTitle(?string $metaTitle): self
  287.     {
  288.         $this->metaTitle $metaTitle;
  289.         return $this;
  290.     }
  291.     public function getMetaDescription(): ?string
  292.     {
  293.         return $this->metaDescription;
  294.     }
  295.     public function setMetaDescription(?string $metaDescription): self
  296.     {
  297.         $this->metaDescription $metaDescription;
  298.         return $this;
  299.     }
  300.     public function getCategory(): ?Category
  301.     {
  302.         return $this->category;
  303.     }
  304.     public function setCategory(?Category $category): self
  305.     {
  306.         $this->category $category;
  307.         return $this;
  308.     }
  309.     public function getCourse(): ?Course
  310.     {
  311.         return $this->course;
  312.     }
  313.     public function setCourse(?Course $course): self
  314.     {
  315.         $this->course $course;
  316.         return $this;
  317.     }
  318.     public function getLanguage(): ?Language
  319.     {
  320.         return $this->language;
  321.     }
  322.     public function setLanguage(?Language $language): self
  323.     {
  324.         $this->language $language;
  325.         return $this;
  326.     }
  327.     public function getItemOrder(): ?int
  328.     {
  329.         return $this->itemOrder;
  330.     }
  331.     public function setItemOrder(?int $itemOrder): self
  332.     {
  333.         $this->itemOrder $itemOrder;
  334.         return $this;
  335.     }
  336.     public function getType(): ?string
  337.     {
  338.         return $this->type;
  339.     }
  340.     public function setType(string $type): self
  341.     {
  342.         $this->type $type;
  343.         return $this;
  344.     }
  345. }