<?php
declare(strict_types=1);
namespace App\Entity;
use App\Entity\Traits\EntitySoftDeletableTrait;
use App\Entity\Traits\EntityTimestampableTrait;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation\SoftDeleteable;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use JMS\Serializer\Annotation\Groups;
/**
* @ORM\Table(name="page_icons")
* @ORM\Entity(repositoryClass="App\Repository\PageIconRepository")
* @SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=false)
* @ExclusionPolicy("all")
*/
class PageIcon extends BaseDomain
{
use EntityTimestampableTrait;
use EntitySoftDeletableTrait;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Expose()
* @Groups({"Page"})
*/
private $title;
/**
* @ORM\ManyToOne(targetEntity="SonataMediaMedia")
*/
private $media;
/**
* @ORM\ManyToOne(targetEntity="Page", inversedBy="icons")
*/
private $page;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Expose()
* @Groups({"Page"})
*/
private $link;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $position;
public function __construct()
{
$this->position = 1;
}
public function __toString()
{
return $this->title;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getTitle()
{
return $this->title;
}
/**
* @param mixed $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return mixed
*/
public function getRoute()
{
return $this->route;
}
/**
* @param mixed $route
*/
public function setRoute($route)
{
$this->route = $route;
}
/**
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* @param string $slug
*/
public function setSlug($slug)
{
$this->slug = $slug;
}
/**
* @return mixed
*/
public function getDescription()
{
return $this->description;
}
/**
* @param mixed $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return mixed
*/
public function getMainPage()
{
return $this->mainPage;
}
/**
* @param mixed $mainPage
*/
public function setMainPage($mainPage)
{
$this->mainPage = $mainPage;
}
/**
* @return Collection|Menu[]
*/
public function getMenus(): Collection
{
return $this->menus;
}
public function addMenu(Menu $menu): self
{
if (!$this->menus->contains($menu)) {
$this->menus[] = $menu;
$menu->setPage($this);
}
return $this;
}
public function removeMenu(Menu $menu): self
{
if ($this->menus->removeElement($menu)) {
// set the owning side to null (unless already changed)
if ($menu->getPage() === $this) {
$menu->setPage(null);
}
}
return $this;
}
/**
* @return mixed
*/
public function getTemplate()
{
return $this->template;
}
/**
* @param mixed $template
*/
public function setTemplate($template)
{
$this->template = $template;
}
/**
* @return mixed
*/
public function getShowListCategory()
{
return $this->showListCategory;
}
/**
* @param mixed $showListCategory
*/
public function setShowListCategory($showListCategory)
{
$this->showListCategory = $showListCategory;
}
/**
* @return mixed
*/
public function getShortDescription()
{
return $this->shortDescription;
}
/**
* @param mixed $shortDescription
*/
public function setShortDescription($shortDescription): void
{
$this->shortDescription = $shortDescription;
}
/**
* @return mixed
*/
public function getDescriptionSliderMainPage()
{
return $this->descriptionSliderMainPage;
}
/**
* @param mixed $descriptionSliderMainPage
*/
public function setDescriptionSliderMainPage($descriptionSliderMainPage): void
{
$this->descriptionSliderMainPage = $descriptionSliderMainPage;
}
/**
* @return mixed
*/
public function getDescriptionSliderButtonMainPage()
{
return $this->descriptionSliderButtonMainPage;
}
/**
* @param mixed $descriptionSliderButtonMainPage
*/
public function setDescriptionSliderButtonMainPage($descriptionSliderButtonMainPage): void
{
$this->descriptionSliderButtonMainPage = $descriptionSliderButtonMainPage;
}
/**
* @return mixed
*/
public function getTitleMarkPrenacapsMainPage()
{
return $this->titleMarkPrenacapsMainPage;
}
/**
* @param mixed $titleMarkPrenacapsMainPage
*/
public function setTitleMarkPrenacapsMainPage($titleMarkPrenacapsMainPage): void
{
$this->titleMarkPrenacapsMainPage = $titleMarkPrenacapsMainPage;
}
/**
* @return mixed
*/
public function getDescriptionMarkPrenacapsMainPage()
{
return $this->descriptionMarkPrenacapsMainPage;
}
/**
* @param mixed $descriptionMarkPrenacapsMainPage
*/
public function setDescriptionMarkPrenacapsMainPage($descriptionMarkPrenacapsMainPage): void
{
$this->descriptionMarkPrenacapsMainPage = $descriptionMarkPrenacapsMainPage;
}
/**
* @return mixed
*/
public function getTitleProducentFormedsMainPage()
{
return $this->titleProducentFormedsMainPage;
}
/**
* @param mixed $titleProducentFormedsMainPage
*/
public function setTitleProducentFormedsMainPage($titleProducentFormedsMainPage): void
{
$this->titleProducentFormedsMainPage = $titleProducentFormedsMainPage;
}
/**
* @return mixed
*/
public function getDescriptionProducentFormedsMainPageFirstColumn()
{
return $this->descriptionProducentFormedsMainPageFirstColumn;
}
/**
* @param mixed $descriptionProducentFormedsMainPageFirstColumn
*/
public function setDescriptionProducentFormedsMainPageFirstColumn($descriptionProducentFormedsMainPageFirstColumn): void
{
$this->descriptionProducentFormedsMainPageFirstColumn = $descriptionProducentFormedsMainPageFirstColumn;
}
/**
* @return mixed
*/
public function getDescriptionProducentFormedsMainPageSecondColumn()
{
return $this->descriptionProducentFormedsMainPageSecondColumn;
}
/**
* @param mixed $descriptionProducentFormedsMainPageSecondColumn
*/
public function setDescriptionProducentFormedsMainPageSecondColumn($descriptionProducentFormedsMainPageSecondColumn): void
{
$this->descriptionProducentFormedsMainPageSecondColumn = $descriptionProducentFormedsMainPageSecondColumn;
}
/**
* @return mixed
*/
public function getMedia()
{
return $this->media;
}
/**
* @param mixed $media
*/
public function setMedia($media)
{
$this->media = $media;
}
/**
* @return mixed
*/
public function getPage()
{
return $this->page;
}
/**
* @param mixed $page
*/
public function setPage($page): void
{
$this->page = $page;
}
/**
*/
public function getPosition(): int
{
return $this->position;
}
/**
*/
public function setPosition(int $position): void
{
$this->position = $position;
}
/**
* @return mixed
*/
public function getLink()
{
return $this->link;
}
/**
* @param mixed $link
*/
public function setLink($link): void
{
$this->link = $link;
}
}