src/Entity/Organisation/PageType.php line 18
<?php
namespace App\Entity\Organisation;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\CreatedTrait;
use App\Entity\Traits\DeletedTrait;
use App\Entity\Traits\UserCreatedInterface;
use App\Entity\Traits\UserCreatedTrait;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'organisation_page_type')]
#[ORM\Entity(repositoryClass: 'App\Repository\Organisation\PageTypeRepository')]
#[ORM\HasLifecycleCallbacks]
class PageType implements UserCreatedInterface
{
use ActiveTrait;
use CreatedTrait;
use UserCreatedTrait;
use DeletedTrait;
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var string|null
*/
#[ORM\Column(type: 'string')]
private $caption;
/**
* @var string|null
*/
#[ORM\Column(type: 'string', length: 150)]
private $slug;
/**
* @var bool
*/
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
private $internal = false;
/**
* @var Type|null
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Organisation\Type', inversedBy: 'page_types')]
#[ORM\JoinColumn(nullable: false)]
private $type;
/**
* @var Collection|Page[]
*/
#[ORM\OneToMany(targetEntity: 'App\Entity\Organisation\Page', mappedBy: 'page_type')]
private $pages;
#[ORM\Column(type: 'text', nullable: true)]
private $content;
/**
* @var int
*/
#[ORM\Column(type: 'integer')]
private $weight = 10;
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string|null $caption
*/
public function setCaption(?string $caption): void
{
$this->caption = $caption;
}
/**
* @return string|null
*/
public function getSlug(): ?string
{
return $this->slug;
}
/**
* @param string|null $slug
*/
public function setSlug(?string $slug): void
{
$this->slug = $slug;
}
/**
* @return Type|null
*/
public function getType(): ?Type
{
return $this->type;
}
/**
* @param Type|null $type
*/
public function setType(?Type $type): void
{
$this->type = $type;
}
/**
* @return Page[]|Collection
*/
public function getPages()
{
return $this->pages;
}
/**
* @param Page[]|Collection $pages
*/
public function setPages($pages): void
{
$this->pages = $pages;
}
/**
* @return mixed
*/
public function getContent()
{
return $this->content;
}
/**
* @param mixed $content
*/
public function setContent($content): void
{
$this->content = $content;
}
/**
* @return int
*/
public function getWeight(): int
{
return $this->weight;
}
/**
* @param int $weight
*/
public function setWeight(int $weight): void
{
$this->weight = $weight;
}
/**
* @return bool
*/
public function isInternal(): bool
{
return $this->internal;
}
/**
* @param bool $internal
*/
public function setInternal(bool $internal): void
{
$this->internal = $internal;
}
}