Model/PageManager.php
public function getPageBySlug($slug)
    {
        $page = $this->doctrine->getManager()->getRepository('Kitpages\CmsBundle\Entity\Page')->findOneBy(array('slug' => $slug));
        return $page;
    }
public function getPageBySlug($slug)
    {
        $page = $this->doctrine->getManager()->getRepository('Kitpages\CmsBundle\Entity\Page')->findOneBy(array('slug' => $slug));
        return $page;
    }
}