Ojs\AdminBundle\Controller\AdminJournalController::newAction PHP Method

newAction() public method

Displays a form to create a new Journal entity.
public newAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\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()));
    }