<?php
namespace App\Entity\Gos;
use App\Entity\Gos\Uniqskills\Course;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* StaticPage
*
* @ORM\Table(name="static_page")
* @ORM\Entity(repositoryClass="App\Repository\StaticPageRepository")
*/
class StaticPage
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var bool
*
* @ORM\Column(type="boolean", nullable=true)
*/
private $isActive;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $itemOrder;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=255)
*/
private $title;
/**
* @Gedmo\Slug(fields={"title"})
* @ORM\Column(unique=true)
*/
private $slug;
/**
* @ORM\Column(type="string")
*/
private $type;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $body;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Gos\PortalSettings", inversedBy="staticPage")
* @ORM\JoinColumn()
*/
private $portalSettings;
/**
* @ORM\ManyToOne(targetEntity="Language", fetch="EAGER")
* @ORM\JoinColumn(name="language_id", referencedColumnName="id")
*/
private $language;
/**
* @ORM\ManyToOne(targetEntity="Category", inversedBy="staticPages")
*/
private $category;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Gos\Uniqskills\Course", inversedBy="staticPage")
* @ORM\JoinColumn()
*/
private $course;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $showOnMainPage;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $showInBoxList;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $metaTitle;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $metaDescription;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
public function __construct()
{
}
/** @ORM\PrePersist() */
public function prePersist()
{
$this->createdAt = new \DateTime();
}
/** @ORM\PreUpdate() */
public function preUpdate()
{
$this->updatedAt = new \DateTime();
}
public function __toString()
{
return (string)$this->title;
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return StaticPage
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set title
*
* @param string $title
*
* @return StaticPage
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set slug
*
* @param string $slug
*
* @return StaticPage
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set body
*
* @param string $body
*
* @return StaticPage
*/
public function setBody($body)
{
$this->body = $body;
return $this;
}
/**
* Get body
*
* @return string
*/
public function getBody()
{
return $this->body;
}
/**
* Set createdAt
*
* @param \DateTime $createdAt
*
* @return StaticPage
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param \DateTime $updatedAt
*
* @return StaticPage
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function getIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(?bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getPortalSettings(): ?PortalSettings
{
return $this->portalSettings;
}
public function setPortalSettings(?PortalSettings $portalSettings): self
{
$this->portalSettings = $portalSettings;
return $this;
}
public function getShowOnMainPage(): ?bool
{
return $this->showOnMainPage;
}
public function setShowOnMainPage(?bool $showOnMainPage): self
{
$this->showOnMainPage = $showOnMainPage;
return $this;
}
public function getShowInBoxList(): ?bool
{
return $this->showInBoxList;
}
public function setShowInBoxList(?bool $showInBoxList): self
{
$this->showInBoxList = $showInBoxList;
return $this;
}
public function getMetaTitle(): ?string
{
return $this->metaTitle;
}
public function setMetaTitle(?string $metaTitle): self
{
$this->metaTitle = $metaTitle;
return $this;
}
public function getMetaDescription(): ?string
{
return $this->metaDescription;
}
public function setMetaDescription(?string $metaDescription): self
{
$this->metaDescription = $metaDescription;
return $this;
}
public function getCategory(): ?Category
{
return $this->category;
}
public function setCategory(?Category $category): self
{
$this->category = $category;
return $this;
}
public function getCourse(): ?Course
{
return $this->course;
}
public function setCourse(?Course $course): self
{
$this->course = $course;
return $this;
}
public function getLanguage(): ?Language
{
return $this->language;
}
public function setLanguage(?Language $language): self
{
$this->language = $language;
return $this;
}
public function getItemOrder(): ?int
{
return $this->itemOrder;
}
public function setItemOrder(?int $itemOrder): self
{
$this->itemOrder = $itemOrder;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
}