<?php
namespace Boab\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Boab\CmsBundle\Entity\Content;
use Boab\CmsBundle\Routing\RouteParameterInterface;
/**
* Article
* @ORM\Table(name="article")
* @ORM\Entity(repositoryClass="Boab\CmsBundle\Repository\ContentRepository")
*/
class Article extends Content implements ArticleInterface, RouteParameterInterface
{
public function getDateExploded()
{
return explode('-',$this->getDate('d-M-Y'));
}
public function getRouteParameters()
{
return [
'slug' => $this->getSlug()
];
}
}