public function createAction(Request $request)
    {
        $job = new Job();
        $form = $this->createForm(new JobType(), $job);
        if ($form->handleRequest($request)->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($job);
            $em->flush();

            return $this->redirect($this->generateUrl('admin_amulen_job_show', array('id' => $job->getId())));
        }

        return array(
            'job' => $job,
            'form' => $form->createView(),
        );
    }
public function createAction(Request $request)
    {
        $job = new Job();
        $form = $this->createForm(new JobType(), $job);
        if ($form->handleRequest($request)->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($job);
            $em->flush();

            return $this->redirect($this->generateUrl('admin_amulen_job_show', array('id' => $job->getId())));
        }

        return array(
            'job' => $job,
            'form' => $form->createView(),
        );
    }
public function createAction ( Request $ request ) { $ job = new Job ( ) ; $ form = $ this -> createForm ( new JobType ( ) , $ job ) ; if ( $ form -> handleRequest ( $ request ) -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> persist ( $ job ) ; $ em -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'admin_amulen_job_show' , array ( 'id' => $ job -> getId ( ) ) ) ) ; } return array ( 'job' => $ job , 'form' => $ form -> createView ( ) , ) ; }
Creates a new Job entity.

@Route("/create", name="admin_amulen_job_create")
@Method("POST")
@Template("FlowcodeDashboardBundle:Job:new.html.twig")
Creates a new Job entity .