Bundle/PageBundle/Controller/BasePageController.php
protected function settingsPostAction(Request $request, BasePage $page)
    {
        $entityManager = $this->getDoctrine()->getManager();
        $form = $this->createSettingsForm($page);

        $form->handleRequest($request);

        if ($form->isValid()) {
            $entityManager->persist($page);
            $entityManager->flush();

            $this->congrat($this->get('translator')->trans('victoire_page.update.success', [], 'victoire'));

            return $this->getViewReferenceRedirect($request, $page);
        }

        return [
            'success' => false,
            'message' => $this->get('victoire_form.error_helper')->getRecursiveReadableErrors($form),
            'html'    => $this->get('templating')->render(
                $this->getBaseTemplatePath().':settings.html.twig',
                [
                    'page'               => $page,
                    'form'               => $form->createView(),
                    'businessProperties' => $this->getBusinessProperties($page),
                ]
            ),
        ];
    }
protected function settingsPostAction(Request $request, BasePage $page)
    {
        $entityManager = $this->getDoctrine()->getManager();
        $form = $this->createSettingsForm($page);

        $form->handleRequest($request);

        if ($form->isValid()) {
            $entityManager->persist($page);
            $entityManager->flush();

            $this->congrat($this->get('translator')->trans('victoire_page.update.success', [], 'victoire'));

            return $this->getViewReferenceRedirect($request, $page);
        }

        return [
            'success' => false,
            'message' => $this->get('victoire_form.error_helper')->getRecursiveReadableErrors($form),
            'html'    => $this->get('templating')->render(
                $this->getBaseTemplatePath().':settings.html.twig',
                [
                    'page'               => $page,
                    'form'               => $form->createView(),
                    'businessProperties' => $this->getBusinessProperties($page),
                ]
            ),
        ];
    }
protected function settingsPostAction ( Request $ request , BasePage $ page ) { $ entityManager = $ this -> getDoctrine ( ) -> getManager ( ) ; $ form = $ this -> createSettingsForm ( $ page ) ; $ form -> handleRequest ( $ request ) ; if ( $ form -> isValid ( ) ) { $ entityManager -> persist ( $ page ) ; $ entityManager -> flush ( ) ; $ this -> congrat ( $ this -> get ( 'translator' ) -> trans ( 'victoire_page.update.success' , [ ] , 'victoire' ) ) ; return $ this -> getViewReferenceRedirect ( $ request , $ page ) ; } return [ 'success' => false , 'message' => $ this -> get ( 'victoire_form.error_helper' ) -> getRecursiveReadableErrors ( $ form ) , 'html' => $ this -> get ( 'templating' ) -> render ( $ this -> getBaseTemplatePath ( ) . ':settings.html.twig' , [ 'page' => $ page , 'form' => $ form -> createView ( ) , 'businessProperties' => $ this -> getBusinessProperties ( $ page ) , ] ) , ] ; }
Save Page settings.
Route is defined in inherited controllers.

@param Request  $request
@param BasePage $page

@return array|Response
Save Page settings . Route is defined in inherited controllers .