public function wrapTemplateAction($module)
    {
        if ($this->getModuleSetting($module, 'type') !== 'template') {
            throw new BadRequestHttpException($module . ' is not declared as a template');
        }
        $path = $this->getModuleSetting($module, 'path');
        $response = new Response();

        return $this->render('eZPlatformUIBundle:Template:wraptemplate.js.twig', [
            'path' => $path,
            'module' => $module,
            'templateCode' => file_get_contents($path),
        ], $response);
    }
public function wrapTemplateAction($module)
    {
        if ($this->getModuleSetting($module, 'type') !== 'template') {
            throw new BadRequestHttpException($module . ' is not declared as a template');
        }
        $path = $this->getModuleSetting($module, 'path');
        $response = new Response();

        return $this->render('eZPlatformUIBundle:Template:wraptemplate.js.twig', [
            'path' => $path,
            'module' => $module,
            'templateCode' => file_get_contents($path),
        ], $response);
    }
public function wrapTemplateAction ( $ module ) { if ( $ this -> getModuleSetting ( $ module , 'type' ) !== 'template' ) { throw new BadRequestHttpException ( $ module . ' is not declared as a template' ) ; } $ path = $ this -> getModuleSetting ( $ module , 'path' ) ; $ response = new Response ( ) ; return $ this -> render ( 'eZPlatformUIBundle:Template:wraptemplate.js.twig' , [ 'path' => $ path , 'module' => $ module , 'templateCode' => file_get_contents ( $ path ) , ] , $ response ) ; }
Wraps the template file content in a YUI module. The generated module
also registers the template under the same name of the module.

@throws \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
if the module is not declared as a template

@param string $module

@return \Symfony\Component\HttpFoundation\Response
Wraps the template file content in a YUI module . The generated module also registers the template under the same name of the module .