<?php


namespace AutoAdmin\Bundle\Content\Entity;

use AutoAdmin\Bundle\Content\Entity\Traits\HiddenBreadcrumbTrait;
use AutoAdmin\Bundle\Content\Entity\Traits\PublishableTrait;
use AutoAdmin\Bundle\Content\Model\PublishableInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

/**
 * Class Page
 *
 * @package AutoAdmin\Bundle\Entity\Content
 */
#[ORM\MappedSuperclass]
abstract class Page extends Content implements PublishableInterface
{
    use PublishableTrait;
    use HiddenBreadcrumbTrait;

    #[ORM\Column(type: Types::BOOLEAN, options: ['default' => false])]
    protected bool $homepage;

    public function isHomepage(): bool
    {
        return $this->homepage;
    }

    public function setHomepage(bool $homepage): self
    {
        $this->homepage = $homepage;

        return $this;
    }
}
