<?php
namespace App\Entity;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\DeleteTrait;
use App\Entity\Traits\ImageUploadTrait;
use App\Entity\Traits\TitleAndContentTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Templates.
*
* @Gedmo\Loggable
*/
#[ORM\Entity(repositoryClass: \App\Repository\PageRepository::class)]
#[ORM\Table(name: 'templates')]
class Templates
{
use TitleAndContentTrait;
use ActiveTrait;
use DeleteTrait;
use ImageUploadTrait;
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private int $id;
#[ORM\Column(name: 'description', type: 'string', length: 255)]
private ?string $description = null;
#[ORM\Column(name: 'templatefile', type: 'string', length: 255)]
private ?string $templatefile = null;
#[ORM\Column(name: 'number_of_html', type: 'integer', nullable: true)]
private ?int $numberOfHtml = null;
#[ORM\Column(name: 'number_of_components', type: 'integer', nullable: true)]
private ?int $numberOfComponents = null;
#[ORM\OneToMany(targetEntity: \App\Entity\Page::class, mappedBy: 'template')]
private Collection $pagetemplate;
#[ORM\Column(name: 'inherited_bundle_name', type: 'string', length: 255, nullable: true)]
private ?string $inherited_bundle_name = null;
public function __construct()
{
$this->pagetemplate = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function setDescription($description): self
{
$this->description = $description;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setTemplatefile($templatefile): self
{
$this->templatefile = $templatefile;
return $this;
}
public function getTemplatefile(): ?string
{
return $this->templatefile;
}
public function setNumberOfHtml($numberOfHtml): self
{
$this->numberOfHtml = $numberOfHtml;
return $this;
}
public function getNumberOfHtml(): ?int
{
return $this->numberOfHtml;
}
public function setNumberOfComponents($numberOfComponents): self
{
$this->numberOfComponents = $numberOfComponents;
return $this;
}
public function getNumberOfComponents(): ?int
{
return $this->numberOfComponents;
}
public function addPagetemplate(Page $pagetemplate): self
{
$this->pagetemplate[] = $pagetemplate;
return $this;
}
public function removePagetemplate(Page $pagetemplate): self
{
$this->pagetemplate->removeElement($pagetemplate);
return $this;
}
public function getPagetemplate(): ArrayCollection
{
return $this->pagetemplate;
}
public function setInheritedBundleName($inherited_bundle_name): self
{
$this->inherited_bundle_name = $inherited_bundle_name;
return $this;
}
public function getInheritedBundleName(): ?string
{
return $this->inherited_bundle_name;
}
}