Bundle/PageBundle/Controller/BasePageController.php
protected function newAction(Request $request, $isHomepage = false)
    {
        $page = $this->getNewPage();
        if ($page instanceof Page) {
            $page->setHomepage($isHomepage ? $isHomepage : 0);
        }

        $form = $this->get('form.factory')->create($this->getNewPageType(), $page);

        return [
            'success' => true,
            'html'    => $this->get('templating')->render(
                $this->getBaseTemplatePath().':new.html.twig',
                ['form' => $form->createView()]
            ),
        ];
    }
protected function newAction(Request $request, $isHomepage = false)
    {
        $page = $this->getNewPage();
        if ($page instanceof Page) {
            $page->setHomepage($isHomepage ? $isHomepage : 0);
        }

        $form = $this->get('form.factory')->create($this->getNewPageType(), $page);

        return [
            'success' => true,
            'html'    => $this->get('templating')->render(
                $this->getBaseTemplatePath().':new.html.twig',
                ['form' => $form->createView()]
            ),
        ];
    }
protected function newAction ( Request $ request , $ isHomepage = false ) { $ page = $ this -> getNewPage ( ) ; if ( $ page instanceof Page ) { $ page -> setHomepage ( $ isHomepage ? $ isHomepage : 0 ) ; } $ form = $ this -> get ( 'form.factory' ) -> create ( $ this -> getNewPageType ( ) , $ page ) ; return [ 'success' => true , 'html' => $ this -> get ( 'templating' ) -> render ( $ this -> getBaseTemplatePath ( ) . ':new.html.twig' , [ 'form' => $ form -> createView ( ) ] ) , ] ; }
Display a form to create a new Blog or Page.
Route is defined in inherited controllers.

@param Request $request
@param bool    $isHomepage

@return array
Display a form to create a new Blog or Page . Route is defined in inherited controllers .