public function typeAction($contentDocument, $_format, Request $request)
    {
        if (!$contentDocument || ! $contentDocument instanceof Page) {
            throw new NotFoundHttpException('Content not found');
        }
        if ($this->container->has('profiler')) {
        	$this->container->get('profiler')->disable();
        }
        $isAdminUi = $request->query->get('admin', false) && $this->container->get('security.context')->isGranted('ROLE_ADMIN');

        $data = $params = $this->formatter->format($contentDocument);
		if("html" == $_format) {
	        $params = array(
	            'cmfMainContent' => $contentDocument,
	        	'jsData' => $data,
	        	'settings' => array("currentPath"=>"/","urlBase"=>"/"),
	        	'isAdminUI' => $isAdminUi,
	        	'serializationContext' => $this->getSerializerContext(array('front'))
	        );
		}

        return $this->renderResponse('ApplicationToguApplicationModelsBundle:Default:index.html.twig', $params);
    }
public function typeAction($contentDocument, $_format, Request $request)
    {
        if (!$contentDocument || ! $contentDocument instanceof Page) {
            throw new NotFoundHttpException('Content not found');
        }
        if ($this->container->has('profiler')) {
        	$this->container->get('profiler')->disable();
        }
        $isAdminUi = $request->query->get('admin', false) && $this->container->get('security.context')->isGranted('ROLE_ADMIN');

        $data = $params = $this->formatter->format($contentDocument);
		if("html" == $_format) {
	        $params = array(
	            'cmfMainContent' => $contentDocument,
	        	'jsData' => $data,
	        	'settings' => array("currentPath"=>"/","urlBase"=>"/"),
	        	'isAdminUI' => $isAdminUi,
	        	'serializationContext' => $this->getSerializerContext(array('front'))
	        );
		}

        return $this->renderResponse('ApplicationToguApplicationModelsBundle:Default:index.html.twig', $params);
    }
public function typeAction ( $ contentDocument , $ _format , Request $ request ) { if ( ! $ contentDocument || ! $ contentDocument instanceof Page ) { throw new NotFoundHttpException ( 'Content not found' ) ; } if ( $ this -> container -> has ( 'profiler' ) ) { $ this -> container -> get ( 'profiler' ) -> disable ( ) ; } $ isAdminUi = $ request -> query -> get ( 'admin' , false ) && $ this -> container -> get ( 'security.context' ) -> isGranted ( 'ROLE_ADMIN' ) ; $ data = $ params = $ this -> formatter -> format ( $ contentDocument ) ; if ( "html" == $ _format ) { $ params = array ( 'cmfMainContent' => $ contentDocument , 'jsData' => $ data , 'settings' => array ( "currentPath" => "/" , "urlBase" => "/" ) , 'isAdminUI' => $ isAdminUi , 'serializationContext' => $ this -> getSerializerContext ( array ( 'front' ) ) ) ; } return $ this -> renderResponse ( 'ApplicationToguApplicationModelsBundle:Default:index.html.twig' , $ params ) ; }
This action is mapped in the controller_by_type map

This can inject something else for the template for content with this type

@param object $contentDocument

@return Response
This action is mapped in the controller_by_type map