personResourceRepository = $personResourceRepository; $this->personRepository = $personRepository; } public function listAction($person_id) { $person = $this->personRepository->find($person_id); $form = $this->createForm(PersonResourceType::class); return $this->render( 'ChillPersonBundle:PersonResource:list.html.twig', [ 'person' => $person, 'form' => $form->createView() ] ); } }