421 lines
8.3 KiB
PHP
Executable File
421 lines
8.3 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Doctrine\Common\Collections\Collection;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* Pagewidget.
|
|
*
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="pagewidget")
|
|
* @ORM\Entity(repositoryClass="App\Repository\PagewidgetRepository")
|
|
*/
|
|
class Pagewidget
|
|
{
|
|
/**
|
|
* @var int
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="name", type="string", length=100)
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="loc", type="string")
|
|
*/
|
|
private $loc;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="roworder", type="integer")
|
|
*/
|
|
private $roworder;
|
|
|
|
/**
|
|
* @var int
|
|
*
|
|
* @ORM\Column(name="height", type="integer")
|
|
*/
|
|
private $height;
|
|
|
|
/**
|
|
* @var bool
|
|
*
|
|
* @ORM\Column(name="autoajust", type="boolean", options={"default":false})
|
|
*/
|
|
protected $autoajust;
|
|
|
|
/**
|
|
* @var bool
|
|
*
|
|
* @ORM\Column(name="border", type="boolean", options={"default":true})
|
|
*/
|
|
protected $border;
|
|
|
|
/**
|
|
* @var bool
|
|
*
|
|
* @ORM\Column(name="opened", type="boolean", options={"default":true})
|
|
*/
|
|
protected $opened;
|
|
|
|
/**
|
|
* @var bool
|
|
*
|
|
* @ORM\Column(name="viewheader", type="boolean", options={"default":true})
|
|
*/
|
|
protected $viewheader;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="colorheaderback", type="string", nullable=true)
|
|
*/
|
|
protected $colorheaderback;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="colorheaderfont", type="string", nullable=true)
|
|
*/
|
|
protected $colorheaderfont;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="colorbodyback", type="string", nullable=true)
|
|
*/
|
|
protected $colorbodyback;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="colorbodyfont", type="string", nullable=true)
|
|
*/
|
|
protected $colorbodyfont;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="parameter", type="array", nullable=true)
|
|
*/
|
|
private $parameter;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Page", inversedBy="pagewidgets")
|
|
*/
|
|
private $page;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Widget", inversedBy="pagewidgets")
|
|
*/
|
|
private $widget;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Icon", inversedBy="pagewidgets")
|
|
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
|
*/
|
|
private $icon;
|
|
|
|
/**
|
|
* @var ArrayCollection
|
|
* @var Bookmark
|
|
*
|
|
* @ORM\OneToMany(targetEntity="Bookmark", mappedBy="pagewidget", cascade={"persist"}, orphanRemoval=true)
|
|
*/
|
|
private $bookmarks;
|
|
|
|
/**
|
|
* @var ArrayCollection
|
|
* @var Slide
|
|
*
|
|
* @ORM\OneToMany(targetEntity="Pagewidgetslide", mappedBy="pagewidget", cascade={"persist"}, orphanRemoval=true)
|
|
*/
|
|
private $pagewidgetslides;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->bookmarks = new ArrayCollection();
|
|
$this->pagewidgetslides = new ArrayCollection();
|
|
}
|
|
|
|
// A garder pour forcer l'id en init
|
|
public function setId($id)
|
|
{
|
|
$this->id = $id;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getName(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(string $name): self
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getLoc(): ?string
|
|
{
|
|
return $this->loc;
|
|
}
|
|
|
|
public function setLoc(string $loc): self
|
|
{
|
|
$this->loc = $loc;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getRoworder(): ?int
|
|
{
|
|
return $this->roworder;
|
|
}
|
|
|
|
public function setRoworder(int $roworder): self
|
|
{
|
|
$this->roworder = $roworder;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getHeight(): ?int
|
|
{
|
|
return $this->height;
|
|
}
|
|
|
|
public function setHeight(int $height): self
|
|
{
|
|
$this->height = $height;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isAutoajust(): ?bool
|
|
{
|
|
return $this->autoajust;
|
|
}
|
|
|
|
public function setAutoajust(bool $autoajust): self
|
|
{
|
|
$this->autoajust = $autoajust;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isBorder(): ?bool
|
|
{
|
|
return $this->border;
|
|
}
|
|
|
|
public function setBorder(bool $border): self
|
|
{
|
|
$this->border = $border;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isOpened(): ?bool
|
|
{
|
|
return $this->opened;
|
|
}
|
|
|
|
public function setOpened(bool $opened): self
|
|
{
|
|
$this->opened = $opened;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isViewheader(): ?bool
|
|
{
|
|
return $this->viewheader;
|
|
}
|
|
|
|
public function setViewheader(bool $viewheader): self
|
|
{
|
|
$this->viewheader = $viewheader;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getColorheaderback(): ?string
|
|
{
|
|
return $this->colorheaderback;
|
|
}
|
|
|
|
public function setColorheaderback(?string $colorheaderback): self
|
|
{
|
|
$this->colorheaderback = $colorheaderback;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getColorheaderfont(): ?string
|
|
{
|
|
return $this->colorheaderfont;
|
|
}
|
|
|
|
public function setColorheaderfont(?string $colorheaderfont): self
|
|
{
|
|
$this->colorheaderfont = $colorheaderfont;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getColorbodyback(): ?string
|
|
{
|
|
return $this->colorbodyback;
|
|
}
|
|
|
|
public function setColorbodyback(?string $colorbodyback): self
|
|
{
|
|
$this->colorbodyback = $colorbodyback;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getColorbodyfont(): ?string
|
|
{
|
|
return $this->colorbodyfont;
|
|
}
|
|
|
|
public function setColorbodyfont(?string $colorbodyfont): self
|
|
{
|
|
$this->colorbodyfont = $colorbodyfont;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getParameter(): array
|
|
{
|
|
return $this->parameter;
|
|
}
|
|
|
|
public function setParameter(?array $parameter): self
|
|
{
|
|
$this->parameter = $parameter;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPage(): ?Page
|
|
{
|
|
return $this->page;
|
|
}
|
|
|
|
public function setPage(?Page $page): self
|
|
{
|
|
$this->page = $page;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getWidget(): ?Widget
|
|
{
|
|
return $this->widget;
|
|
}
|
|
|
|
public function setWidget(?Widget $widget): self
|
|
{
|
|
$this->widget = $widget;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getIcon(): ?Icon
|
|
{
|
|
return $this->icon;
|
|
}
|
|
|
|
public function setIcon(?Icon $icon): self
|
|
{
|
|
$this->icon = $icon;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Collection<int, Bookmark>
|
|
*/
|
|
public function getBookmarks(): Collection
|
|
{
|
|
return $this->bookmarks;
|
|
}
|
|
|
|
public function addBookmark(Bookmark $bookmark): self
|
|
{
|
|
if (!$this->bookmarks->contains($bookmark)) {
|
|
$this->bookmarks->add($bookmark);
|
|
$bookmark->setPagewidget($this);
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function removeBookmark(Bookmark $bookmark): self
|
|
{
|
|
if ($this->bookmarks->removeElement($bookmark)) {
|
|
// set the owning side to null (unless already changed)
|
|
if ($bookmark->getPagewidget() === $this) {
|
|
$bookmark->setPagewidget(null);
|
|
}
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Collection<int, Pagewidgetslide>
|
|
*/
|
|
public function getPagewidgetslides(): Collection
|
|
{
|
|
return $this->pagewidgetslides;
|
|
}
|
|
|
|
public function addPagewidgetslide(Pagewidgetslide $pagewidgetslide): self
|
|
{
|
|
if (!$this->pagewidgetslides->contains($pagewidgetslide)) {
|
|
$this->pagewidgetslides->add($pagewidgetslide);
|
|
$pagewidgetslide->setPagewidget($this);
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function removePagewidgetslide(Pagewidgetslide $pagewidgetslide): self
|
|
{
|
|
if ($this->pagewidgetslides->removeElement($pagewidgetslide)) {
|
|
// set the owning side to null (unless already changed)
|
|
if ($pagewidgetslide->getPagewidget() === $this) {
|
|
$pagewidgetslide->setPagewidget(null);
|
|
}
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
}
|