src/Flowcode/DashboardBundle/Controller/SettingController.php
public function createAction(Request $request)
    {
        $setting = new Setting();
        $form = $this->createForm($this->get('amulen.dashboard.form.setting'), $setting);
        if ($form->handleRequest($request)->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($setting);
            $em->flush();

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

        return array(
            'setting' => $setting,
            'form' => $form->createView(),
        );
    }
public function createAction(Request $request)
    {
        $setting = new Setting();
        $form = $this->createForm($this->get('amulen.dashboard.form.setting'), $setting);
        if ($form->handleRequest($request)->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($setting);
            $em->flush();

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

        return array(
            'setting' => $setting,
            'form' => $form->createView(),
        );
    }
Creates a new Setting entity.

@Route("/create", name="admin_amulen_setting_create")
@Method("POST")
@Template("FlowcodeDashboardBundle:Setting:new.html.twig")