lib/boab/cms-bundle/src/Entity/Article.php line 14

Open in your IDE?
  1. <?php
  2. namespace Boab\CmsBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Boab\CmsBundle\Entity\Content;
  5. use Boab\CmsBundle\Routing\RouteParameterInterface;
  6. /**
  7.  * Article
  8.  * @ORM\Table(name="article")
  9.  * @ORM\Entity(repositoryClass="Boab\CmsBundle\Repository\ContentRepository")
  10.  */
  11. class Article extends Content implements ArticleInterfaceRouteParameterInterface
  12. {
  13.    public function getDateExploded()
  14.     {
  15.         return explode('-',$this->getDate('d-M-Y'));
  16.     }
  17.     public function getRouteParameters()
  18.     {
  19.         return [
  20.             'slug' => $this->getSlug()
  21.         ];
  22.     }    
  23. }