src/Entity/Document/Document.php line 14
<?phpnamespace App\Entity\Document;use App\Entity\User;use App\Repository\Document\DocumentRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: DocumentRepository::class)]#[ORM\Table(name: 'webdocument')]class Document{public function className() {return "Document";}#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $title = null;#[ORM\Column(length: 255, nullable: true)]private ?string $description = null;#[ORM\Column(length: 255, nullable: true)]private ?string $tags = null;#[ORM\OneToMany(mappedBy: 'document', targetEntity: Block::class)]#[ORM\OrderBy(["blockorder" => "ASC"])]private Collection $blocks;#[ORM\ManyToOne(inversedBy: 'documents')]private ?User $owner = null;#[ORM\Column(nullable: true)]private ?bool $isTemplate = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $updateDate = null;public function __construct(){$this->blocks = new ArrayCollection();}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 getDescription(): ?string{return $this->description;}public function setDescription(?string $description): self{$this->description = $description;return $this;}public function getTags(): ?string{return $this->tags;}public function setTags(?string $tags): self{$this->tags = $tags;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->setDocument($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->getDocument() === $this) {$block->setDocument(null);}}return $this;}public static function clone(Document $source){$document = new Document();$document->setTags($source->getTags());$document->setDescription($source->getDescription());$document->setTitle($source->getTitle());$document->setOwner($source->getOwner());foreach($source->getBlocks() as $block)$document->addBlock(Block::clone($block));return $document;}public function getOwner(): ?User{return $this->owner;}public function setOwner(?User $owner): self{$this->owner = $owner;return $this;}public function isIsTemplate(): ?bool{return $this->isTemplate;}public function setIsTemplate(?bool $isTemplate): self{$this->isTemplate = $isTemplate;return $this;}public function getUpdateDate(): ?\DateTimeInterface{return $this->updateDate;}public function setUpdateDate(?\DateTimeInterface $updateDate): self{$this->updateDate = $updateDate;return $this;}}