SatisAdmin\Controller\DefaultController::updateAction PHP Method

updateAction() public method

public updateAction ( Request $request ) : string
$request Symfony\Component\HttpFoundation\Request
return string
    public function updateAction(Request $request)
    {
        $form = $this->getForm();
        $form->bind($request);
        if ($form->isValid()) {
            $this->getModelManager()->persist($form->getData());
            $this->app['dispatcher']->dispatch(Events::CONFIG_SAVED, new ConfigSavedEvent($form->getData()));
            return $this->app->redirect($this->app->path('config_index'));
        }
        return $this->app->render('default/edit.html.twig', ['form' => $form->createView()]);
    }