CoreBundle/Controller/RoleController.php
public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $roles = $em->getRepository('CoreBundle:Role')->findAll();

        return array(
            'roles' => $roles,
        );
    }
public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $roles = $em->getRepository('CoreBundle:Role')->findAll();

        return array(
            'roles' => $roles,
        );
    }
public function indexAction ( ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ roles = $ em -> getRepository ( 'CoreBundle:Role' ) -> findAll ( ) ; return array ( 'roles' => $ roles , ) ; }
Lists all role entities.

@Route("/")
@Method("GET")
@Template()
Lists all role entities .