src/Entity/Dialogue.php line 13
<?phpnamespace App\Entity;use App\Repository\DialogueRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;#[ORM\Entity(repositoryClass: DialogueRepository::class)]class Dialogue{const STATUS_PUBLIC = "public";const STATUS_NOT_PUBLIC = "not public";const STATUS_EXTRA = "extra";static public function getTypeOptions(){return ['Niepubliczny' => self::STATUS_NOT_PUBLIC,'Publiczny' => self::STATUS_PUBLIC,'Ekstra' => self::STATUS_EXTRA,];}#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $title = null;#[ORM\Column]#[Gedmo\SortablePosition]private ?int $position = null;#[ORM\OneToMany(mappedBy: 'dialogue', targetEntity: Block::class, orphanRemoval: true)]private Collection $blocks;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $content = null;#[ORM\Column(length: 255, nullable: true)]private ?string $image = null;#[ORM\Column(length: 255, nullable: true)]private ?string $color = null;#[ORM\Column(length: 255, nullable: true)]private ?string $backgroundColor = null;#[ORM\Column(length: 255)]private ?string $status = null;public function __construct(){$this->blocks = new ArrayCollection();}public function __toString(){return $this->title;}public function getId(): ?int{return $this->id;}public function getTitle(): ?string{return $this->title;}public function setTitle(string $title): self{$this->title = $title;return $this;}public function getPosition(): ?int{return $this->position;}public function setPosition(int $position): self{$this->position = $position;return $this;}/*** @return Collection<int, Block>*/public function getBlocks(): Collection{return $this->blocks;}public function addBlock(Block $block): self{if (!$this->blocks->contains($block)) {$this->blocks->add($block);$block->setDialogue($this);}return $this;}public function removeBlock(Block $block): self{if ($this->blocks->removeElement($block)) {// set the owning side to null (unless already changed)if ($block->getDialogue() === $this) {$block->setDialogue(null);}}return $this;}public function getContent(): ?string{return $this->content;}public function setContent(?string $content): self{$this->content = $content;return $this;}public function getImage(): ?string{return ($this->image ? $this->image : '');}public function setImage(?string $image): self{$this->image = $image;return $this;}public function getColor(): ?string{return $this->color;}public function setColor(?string $color): self{$this->color = $color;return $this;}public function getBackgroundColor(): ?string{return $this->backgroundColor;}public function setBackgroundColor(?string $backgroundColor): self{$this->backgroundColor = $backgroundColor;return $this;}public function getStatus(): ?string{return $this->status;}public function setStatus(string $status): self{$this->status = $status;return $this;}}