Listing 26.8. Kod akcji show
/**
* @Route("/{id}.html", name="song_show")
 * @Template()
 */
public function showAction($id)
{
    $em = $this->getDoctrine()->getEntityManager();
    $entity = $em->getRepository('MyFrontendBundle:Song')->find($id);

    if (!$entity) {
        throw $this->createNotFoundException('Podana strona nie istnieje!');
    }

    return array('entity' => $entity);
}