/** * Creates a form to delete a Country entity. * * @param Country $country The Country entity * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm(Country $country) { return $this->createFormBuilder()->setAction($this->generateUrl('admin_country_delete', array('id' => $country->getId())))->setMethod('DELETE')->getForm(); }
/** * @Route("/country/{id}/coin", name="country_id_coin", options={"expose"=true}) * @Method("GET") * @ParamConverter("id", class="\TS\CYABundle\Entity\Country") * * @param Country $country * @return JsonResponse */ public function coinSimbolByIdAction(Country $country) { $coin = $country->getCoin(); return new JsonResponse($coin->getCode() . ' ' . $coin->getSymbol()); }