nineskeletor/src/Entity/Widget.php

386 lines
7.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;
/**
* Widget.
*
* @ORM\Entity
* @ORM\Table(name="widget")
* @ORM\Entity(repositoryClass="App\Repository\WidgetRepository")
*/
class Widget
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="roworder", type="integer")
*/
private $roworder;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=100)
*/
private $name;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @var string
*
* @ORM\Column(name="routeview", type="string")
*/
private $routeview;
/**
* @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="access", type="array", nullable=true)
*/
protected $access;
/**
* @var string
*
* @ORM\Column(name="parameter", type="array", nullable=true)
*/
private $parameter;
/**
* @ORM\ManyToOne(targetEntity="Icon", inversedBy="widgets")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private $icon;
/**
* @var ArrayCollection
* @var Order
*
* @ORM\OneToMany(targetEntity="Pagewidget", mappedBy="widget", cascade={"persist"}, orphanRemoval=true)
*/
private $pagewidgets;
public function __construct()
{
$this->pagewidgets = 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 getRoworder(): ?int
{
return $this->roworder;
}
public function setRoworder(int $roworder): self
{
$this->roworder = $roworder;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getRouteview(): ?string
{
return $this->routeview;
}
public function setRouteview(string $routeview): self
{
$this->routeview = $routeview;
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 getAccess(): array
{
return $this->access;
}
public function setAccess(?array $access): self
{
$this->access = $access;
return $this;
}
public function getParameter(): array
{
return $this->parameter;
}
public function setParameter(?array $parameter): self
{
$this->parameter = $parameter;
return $this;
}
public function getIcon(): ?Icon
{
return $this->icon;
}
public function setIcon(?Icon $icon): self
{
$this->icon = $icon;
return $this;
}
/**
* @return Collection<int, Pagewidget>
*/
public function getPagewidgets(): Collection
{
return $this->pagewidgets;
}
public function addPagewidget(Pagewidget $pagewidget): self
{
if (!$this->pagewidgets->contains($pagewidget)) {
$this->pagewidgets->add($pagewidget);
$pagewidget->setWidget($this);
}
return $this;
}
public function removePagewidget(Pagewidget $pagewidget): self
{
if ($this->pagewidgets->removeElement($pagewidget)) {
// set the owning side to null (unless already changed)
if ($pagewidget->getWidget() === $this) {
$pagewidget->setWidget(null);
}
}
return $this;
}
}