public function newAction(Request $request)
    {
        $sakonninTemplate = new Sakonnintemplate();
        $default_lang_code = $this->container->get('translator')->getLocale();
        $sakonninTemplate->setLangCode($default_lang_code);
        $form = $this->createForm('BisonLab\SakonninBundle\Form\SakonninTemplateType', $sakonninTemplate);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $em = $this->getDoctrineManager();
            $em->persist($sakonninTemplate);
            $em->flush();

            return $this->redirectToRoute('sakonnintemplate_show', array('id' => $sakonninTemplate->getId()));
        }

        return $this->render('BisonLabSakonninBundle:SakonninTemplate:new.html.twig',
            array(
            'sakonninTemplate' => $sakonninTemplate,
            'form' => $form->createView(),
        ));
    }
public function newAction(Request $request)
    {
        $sakonninTemplate = new Sakonnintemplate();
        $default_lang_code = $this->container->get('translator')->getLocale();
        $sakonninTemplate->setLangCode($default_lang_code);
        $form = $this->createForm('BisonLab\SakonninBundle\Form\SakonninTemplateType', $sakonninTemplate);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $em = $this->getDoctrineManager();
            $em->persist($sakonninTemplate);
            $em->flush();

            return $this->redirectToRoute('sakonnintemplate_show', array('id' => $sakonninTemplate->getId()));
        }

        return $this->render('BisonLabSakonninBundle:SakonninTemplate:new.html.twig',
            array(
            'sakonninTemplate' => $sakonninTemplate,
            'form' => $form->createView(),
        ));
    }
public function newAction ( Request $ request ) { $ sakonninTemplate = new Sakonnintemplate ( ) ; $ default_lang_code = $ this -> container -> get ( 'translator' ) -> getLocale ( ) ; $ sakonninTemplate -> setLangCode ( $ default_lang_code ) ; $ form = $ this -> createForm ( 'BisonLab\SakonninBundle\Form\SakonninTemplateType' , $ sakonninTemplate ) ; $ form -> handleRequest ( $ request ) ; if ( $ form -> isSubmitted ( ) && $ form -> isValid ( ) ) { $ em = $ this -> getDoctrineManager ( ) ; $ em -> persist ( $ sakonninTemplate ) ; $ em -> flush ( ) ; return $ this -> redirectToRoute ( 'sakonnintemplate_show' , array ( 'id' => $ sakonninTemplate -> getId ( ) ) ) ; } return $ this -> render ( 'BisonLabSakonninBundle:SakonninTemplate:new.html.twig' , array ( 'sakonninTemplate' => $ sakonninTemplate , 'form' => $ form -> createView ( ) , ) ) ; }
Creates a new sakonninTemplate entity.

@Route("/new", name="sakonnintemplate_new", methods={"GET", "POST"})
Creates a new sakonninTemplate entity .