<?php
namespace App\AtechNet\CoreBundle\Entity;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\MappedSuperclass;
/**
* AbstractPage
*
* @MappedSuperclass
* @HasLifecycleCallbacks
*/
abstract class AbstractPage extends AbstractSignedEntity
{
public const TYPE_STATIC = 1;
public const TYPE_BLOG = 2;
public const TYPE_CATEGORY = 3;
/**
* @return array
*/
public static function getTypeChoices()
{
return [
self::TYPE_STATIC => 'static',
self::TYPE_BLOG => 'blog',
self::TYPE_CATEGORY => 'category',
];
}
/**
* @return array
*/
public static function getEntityNameByTypeChoices()
{
return [
'static' => 'StaticPage',
'blog' => 'BlogPage',
'category' => 'CategoryPage',
];
}
/**
* @var bool
*
* @Column(name="published", type="boolean")
*/
private $published = false;
/**
* @var bool
*
* @Column(name="indexable", type="boolean")
*/
private $indexable = true;
/**
* @var string
*
* @Column(name="social_share_image", type="text", nullable=true)
*/
private $socialShareImage;
/**
* @return bool
*/
public function isPublished()
{
return $this->published;
}
/**
* @param bool $published
*/
public function setPublished($published)
{
$this->published = $published;
}
/**
* @return bool
*/
public function isIndexable()
{
return $this->indexable;
}
/**
* @param bool $indexable
*/
public function setIndexable($indexable)
{
$this->indexable = $indexable;
}
/**
* @return string
*/
public function getSocialShareImage()
{
return $this->socialShareImage;
}
/**
* @param string $socialShareImage
*/
public function setSocialShareImage($socialShareImage)
{
$this->socialShareImage = $socialShareImage;
}
}