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);
    }