heroRepository = $heroRepository; } /** * @Rest\View() */ public function cgetAction() { $heros = $this->heroRepository->findAll(); return $this->view($heros, Response::HTTP_OK); } }