217 lines
3.9 KiB
PHP
217 lines
3.9 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Doctrine\Common\Collections\Collection;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* Childtype.
|
|
*
|
|
* @ORM\Table(name="childtype")
|
|
* @ORM\Entity(repositoryClass="App\Repository\ChildtypeRepository")
|
|
*/
|
|
class Childtype
|
|
{
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="string")
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $roworder;
|
|
|
|
/**
|
|
* @ORM\Column(type="string")
|
|
*/
|
|
private $submitroute;
|
|
|
|
/**
|
|
* @ORM\Column(type="boolean")
|
|
*/
|
|
private $havechildheader;
|
|
|
|
/**
|
|
* @ORM\Column(type="boolean")
|
|
*/
|
|
private $havefile;
|
|
|
|
/**
|
|
* @ORM\Column(type="boolean")
|
|
*/
|
|
private $haveurl;
|
|
|
|
/**
|
|
* @ORM\Column(type="boolean")
|
|
*/
|
|
private $havepin;
|
|
|
|
/**
|
|
* @ORM\OneToMany(targetEntity="Child", mappedBy="childtype", cascade={"persist"}, orphanRemoval=false)
|
|
* @ORM\OrderBy({"roworder" = "ASC"})
|
|
*/
|
|
private $childs;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->childs = new ArrayCollection();
|
|
$this->childtypeattributs = new ArrayCollection();
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setId(int $id): self
|
|
{
|
|
$this->id = $id;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getName(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(string $name): self
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getRoworder(): ?int
|
|
{
|
|
return $this->roworder;
|
|
}
|
|
|
|
public function setRoworder(int $roworder): self
|
|
{
|
|
$this->roworder = $roworder;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getSubmitroute(): ?string
|
|
{
|
|
return $this->submitroute;
|
|
}
|
|
|
|
public function setSubmitroute(string $submitroute): self
|
|
{
|
|
$this->submitroute = $submitroute;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getHavechildheader(): ?bool
|
|
{
|
|
return $this->havechildheader;
|
|
}
|
|
|
|
public function setHavechildheader(bool $havechildheader): self
|
|
{
|
|
$this->havechildheader = $havechildheader;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getHavefile(): ?bool
|
|
{
|
|
return $this->havefile;
|
|
}
|
|
|
|
public function setHavefile(bool $havefile): self
|
|
{
|
|
$this->havefile = $havefile;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getHaveurl(): ?bool
|
|
{
|
|
return $this->haveurl;
|
|
}
|
|
|
|
public function setHaveurl(bool $haveurl): self
|
|
{
|
|
$this->haveurl = $haveurl;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Collection|Child[]
|
|
*/
|
|
public function getChilds(): Collection
|
|
{
|
|
return $this->childs;
|
|
}
|
|
|
|
public function addChild(Child $child): self
|
|
{
|
|
if (!$this->childs->contains($child)) {
|
|
$this->childs[] = $child;
|
|
$child->setChildtype($this);
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function removeChild(Child $child): self
|
|
{
|
|
if ($this->childs->contains($child)) {
|
|
$this->childs->removeElement($child);
|
|
// set the owning side to null (unless already changed)
|
|
if ($child->getChildtype() === $this) {
|
|
$child->setChildtype(null);
|
|
}
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getHavepin(): ?bool
|
|
{
|
|
return $this->havepin;
|
|
}
|
|
|
|
public function setHavepin(bool $havepin): self
|
|
{
|
|
$this->havepin = $havepin;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isHavechildheader(): ?bool
|
|
{
|
|
return $this->havechildheader;
|
|
}
|
|
|
|
public function isHavefile(): ?bool
|
|
{
|
|
return $this->havefile;
|
|
}
|
|
|
|
public function isHaveurl(): ?bool
|
|
{
|
|
return $this->haveurl;
|
|
}
|
|
|
|
public function isHavepin(): ?bool
|
|
{
|
|
return $this->havepin;
|
|
}
|
|
}
|