<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\DiaporamaBlockRepository")
*/
class DiaporamaBlock
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Diaporama", inversedBy="blocks")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="diaporama_id", referencedColumnName="id", onDelete="CASCADE")
* })
*/
private $diaporama;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Block", inversedBy="diaporamas", cascade={"persist"})
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="block_id", referencedColumnName="id")
* })
*/
private $block;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $position;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="diaporamaBlocks")
*/
private $owner;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="diaporamaBlocks")
*/
private $entity;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdBy;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedBy;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $blockStyle;
/**
* @ORM\Column(type="json", nullable=true, options={"comment":"Options de visibilité"})
*/
private $visibilityOptions;
public function getId(): ?int
{
return $this->id;
}
public function getDiaporama(): ?Diaporama
{
return $this->diaporama;
}
public function setDiaporama(?Diaporama $diaporama): self
{
$this->diaporama = $diaporama;
return $this;
}
public function getBlock(): ?Block
{
return $this->block;
}
public function setBlock(?Block $block): self
{
$this->block = $block;
return $this;
}
public function getPosition(): ?string
{
return $this->position;
}
public function setPosition(string $position): self
{
$this->position = $position;
return $this;
}
public function getOwner(): ?User
{
return $this->owner;
}
public function setOwner(?User $owner): self
{
$this->owner = $owner;
return $this;
}
public function getEntity(): ?DnsitEntity
{
return $this->entity;
}
public function setEntity(?DnsitEntity $entity): self
{
$this->entity = $entity;
return $this;
}
public function getCreatedBy(): ?\DateTimeInterface
{
return $this->createdBy;
}
public function setCreatedBy(?\DateTimeInterface $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getUpdatedBy(): ?\DateTimeInterface
{
return $this->updatedBy;
}
public function setUpdatedBy(?\DateTimeInterface $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
public function getBlockStyle(): ?array
{
return $this->blockStyle;
}
public function setBlockStyle(?array $blockStyle): self
{
$this->blockStyle = $blockStyle;
return $this;
}
public function getVisibilityOptions() : ?array
{
return $this->visibilityOptions;
}
public function setVisibilityOptions(?array $visibilityOptions) : self
{
$this->visibilityOptions = $visibilityOptions;
return $this;
}
}