public function generateTemplate($dir, $themeName, $templateName, $assets)
    {
        $themeBasename = str_replace('Bundle', '', $themeName);
        $extensionAlias = Container::underscore($themeBasename);

        $parameters = array(
            'theme_name' => $themeName,
            'template_name' => $templateName,
            'extension_alias' => $extensionAlias,
            'assets' => $assets,
        );

        $templateFile = $templateName.'.xml';
        $this->setSkeletonDirs($this->themeSkeletonDir);
        $this->renderFile('template.xml', $dir . '/' . $templateFile, $parameters);

        return sprintf('The template <info>%s</info> has been generated into <info>%s</info>', $templateFile, $dir);
    }
public function generateTemplate($dir, $themeName, $templateName, $assets)
    {
        $themeBasename = str_replace('Bundle', '', $themeName);
        $extensionAlias = Container::underscore($themeBasename);

        $parameters = array(
            'theme_name' => $themeName,
            'template_name' => $templateName,
            'extension_alias' => $extensionAlias,
            'assets' => $assets,
        );

        $templateFile = $templateName.'.xml';
        $this->setSkeletonDirs($this->themeSkeletonDir);
        $this->renderFile('template.xml', $dir . '/' . $templateFile, $parameters);

        return sprintf('The template <info>%s</info> has been generated into <info>%s</info>', $templateFile, $dir);
    }
public function generateTemplate ( $ dir , $ themeName , $ templateName , $ assets ) { $ themeBasename = str_replace ( 'Bundle' , '' , $ themeName ) ; $ extensionAlias = Container :: underscore ( $ themeBasename ) ; $ parameters = array ( 'theme_name' => $ themeName , 'template_name' => $ templateName , 'extension_alias' => $ extensionAlias , 'assets' => $ assets , ) ; $ templateFile = $ templateName . '.xml' ; $ this -> setSkeletonDirs ( $ this -> themeSkeletonDir ) ; $ this -> renderFile ( 'template.xml' , $ dir . '/' . $ templateFile , $ parameters ) ; return sprintf ( 'The template <info>%s</info> has been generated into <info>%s</info>' , $ templateFile , $ dir ) ; }
Generates the template file
@param string $dir The directory where the generated file must be saved
@param string $themeName
@param string $templateName
@param array $assets
@return string A message formatted to be displayed on the console
Generates the template file