Set country
public setCountry ( BulutYazilim\LocationBundle\Entity\Country $country = null ) : |
||
$country | BulutYazilim\LocationBundle\Entity\Country | |
return |
/** * Displays a form to create a new Journal entity. * * @param Request $request * @return Response */ public function newAction(Request $request) { $em = $this->getDoctrine()->getManager(); $defaultCountry = $em->getRepository('BulutYazilimLocationBundle:Country')->find($this->getParameter('country_id')); $entity = new Journal(); $entity->setCountry($defaultCountry); $entity->setCurrentLocale($request->getDefaultLocale()); $form = $this->createCreateForm($entity); return $this->render('OjsAdminBundle:AdminJournal:new.html.twig', array('entity' => $entity, 'form' => $form->createView())); }