public function getRendition($name)
{
$renditions = $this->getRenditions();
$rendition = array_key_exists($name, $renditions) ? $renditions[$name] : null;
if ($rendition !== null) {
$rendition = $this->orm->getRepository('Newscoop\\Image\\Rendition')->find($rendition->getName());
$this->orm->persist($rendition);
$this->orm->flush($rendition);
}
return $rendition;
}