<?phpnamespace App\Entity\Gos\Tmpl;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * * @ORM\Entity() * @ORM\Table(name="tmpl_modules") * @ORM\HasLifecycleCallbacks */class TmplModule{ /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(type="text", length=255) */ private $name; /** * @ORM\OneToMany(targetEntity="App\Entity\Gos\Tmpl\TmplItem", mappedBy="tmplModule") */ private $tmplItems; /** * @var boolean * @ORM\Column(type="boolean", nullable=false, options={"default": 1}) */ private $hasSidebar; /** * @ORM\Column(type="boolean") */ private $enabledInStaticPage; public function __toString() { return $this->getName(); } public function __construct() { $this->tmplItems = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection|TmplItem[] */ public function getTmplItems(): Collection { return $this->tmplItems; } public function addTmplItem(TmplItem $tmplItem): self { if (!$this->tmplItems->contains($tmplItem)) { $this->tmplItems[] = $tmplItem; $tmplItem->setTmplModule($this); } return $this; } public function removeTmplItem(TmplItem $tmplItem): self { if ($this->tmplItems->contains($tmplItem)) { $this->tmplItems->removeElement($tmplItem); // set the owning side to null (unless already changed) if ($tmplItem->getTmplModule() === $this) { $tmplItem->setTmplModule(null); } } return $this; } public function getHasSidebar(): ?bool { return $this->hasSidebar; } public function setHasSidebar(bool $hasSidebar): self { $this->hasSidebar = $hasSidebar; return $this; } public function getEnabledInStaticPage(): ?bool { return $this->enabledInStaticPage; } public function setEnabledInStaticPage(bool $enabledInStaticPage): self { $this->enabledInStaticPage = $enabledInStaticPage; return $this; }}