Created
February 14, 2012 16:07
-
-
Save yuriteixeira/1827790 to your computer and use it in GitHub Desktop.
SF2, Doctrine and Caching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param string $blockSlug | |
* @return \Rocket\BraPrintBundle\Entity\CmsBlock | |
*/ | |
public function getBlock($blockSlug) { | |
$result = ''; | |
$repo = $this->getEntityManager()->getRepository('RocketBraPrintBundle:CmsBlock'); | |
$item = $repo->findOneBySlug($blockSlug); | |
if ($item instanceof CmsBlock) { | |
$result = $item->getContent(); | |
} | |
return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment