<?php
namespace Cms\Modules\PageBundle\Entity\Page;
use App\Entity\Content\Common\DiscriminatorInterface;
use App\Entity\Content\Common\DiscriminatorTrait;
use Cms\CoreBundle\Model\Interfaces\Loggable\LoggableInterface;
use Cms\ModuleBundle\Entity\Proxy;
use Cms\Modules\PageBundle\Model\Page\PageData;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Class PageProxy
* @package Cms\Modules\PageBundle\Entity\Page
*
* @property PageData $data
* @property ArrayCollection|PageHistory[] $histories
* @property PageHistory $history
* @property ArrayCollection|PageDraft[] $drafts
*
* @method PageData getData()
* @method ArrayCollection|PageHistory[] getHistories()
* @method PageHistory getHistory()
* @method PageDraft getDraft()
* @method ArrayCollection|PageDraft[] getDrafts()
* @method PageProxy setData(PageData $value)
* @method PageProxy setHistory(PageHistory $value)
*
* @ORM\Entity
* @ORM\Table(indexes={@ORM\Index(columns={"data_content"}, flags={"fulltext"})})
*/
class PageProxy extends Proxy implements LoggableInterface, DiscriminatorInterface
{
const TYPE = 'Page';
const LOCKABLE_TYPE = 'page';
const DISCR = 'legacy.page';
use PageDataTrait;
use DiscriminatorTrait;
/**
* {@inheritdoc}
*/
public function getLoggableDetails()
{
return array(
'id' => $this->getId(),
'title' => $this->getData()->getTitle(),
'container' => $this->getContainer()->getLoggableDetails(),
);
}
}