src/Entity/Organisation/Page.php line 17
<?php
namespace App\Entity\Organisation;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\TrackerFields;
use App\Entity\Traits\UserCreatedInterface;
use App\Entity\Traits\UserUpdatedInterface;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'organisation_page')]
#[ORM\Index(name: 'idx_url', columns: ['slug'])]
#[ORM\Index(name: 'idx_active', columns: ['active'])]
#[ORM\Entity(repositoryClass: 'App\Repository\Organisation\PageRepository')]
#[ORM\HasLifecycleCallbacks]
class Page implements UserCreatedInterface, UserUpdatedInterface
{
use TrackerFields;
use ActiveTrait;
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var string|null
*/
#[ORM\Column(type: 'string', length: 100)]
private $slug;
/**
* @var string|null
*/
#[ORM\Column(type: 'string')]
private $caption;
/**
* @var string|null
*/
#[ORM\Column(type: 'text', nullable: true)]
private $content;
/**
* @var Organisation
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Organisation\Organisation', inversedBy: 'pages')]
#[ORM\JoinColumn(nullable: false)]
private $organisation;
/**
*
* @var PageType|null
*/
#[ORM\ManyToOne(targetEntity: \App\Entity\Organisation\PageType::class, inversedBy: 'pages')]
private $page_type;
/**
* @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 getSlug(): ?string
{
return $this->slug;
}
/**
* @param string|null $slug
*/
public function setSlug(?string $slug): void
{
$this->slug = $slug;
}
/**
* @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 getContent(): ?string
{
return $this->content;
}
/**
* @param string|null $content
*/
public function setContent(?string $content): void
{
$this->content = $content;
}
/**
* @return Organisation
*/
public function getOrganisation(): Organisation
{
return $this->organisation;
}
/**
* @param Organisation $organisation
*/
public function setOrganisation(Organisation $organisation): void
{
$this->organisation = $organisation;
}
/**
* @return PageType|null
*/
public function getPageType(): ?PageType
{
return $this->page_type;
}
/**
* @param PageType|null $page_type
*/
public function setPageType(?PageType $page_type): void
{
$this->page_type = $page_type;
}
/**
* @return int
*/
public function getWeight(): int
{
return $this->weight;
}
/**
* @param int $weight
*/
public function setWeight(int $weight): void
{
$this->weight = $weight;
}
}