|
@@ -35,6 +35,7 @@ class InitBundleCommand extends Command
|
|
new InputArgument('namespace', InputArgument::REQUIRED, 'The namespace of the bundle to create'),
|
|
new InputArgument('namespace', InputArgument::REQUIRED, 'The namespace of the bundle to create'),
|
|
new InputArgument('dir', InputArgument::REQUIRED, 'The directory where to create the bundle'),
|
|
new InputArgument('dir', InputArgument::REQUIRED, 'The directory where to create the bundle'),
|
|
new InputArgument('bundleName', InputArgument::OPTIONAL, 'The optional bundle name'),
|
|
new InputArgument('bundleName', InputArgument::OPTIONAL, 'The optional bundle name'),
|
|
|
|
+ new InputOption('format', '', InputOption::VALUE_REQUIRED, 'Use the format for configuration files (php, xml, or yml)', 'xml')
|
|
))
|
|
))
|
|
->setHelp(<<<EOT
|
|
->setHelp(<<<EOT
|
|
The <info>init:bundle</info> command generates a new bundle with a basic skeleton.
|
|
The <info>init:bundle</info> command generates a new bundle with a basic skeleton.
|
|
@@ -93,7 +94,8 @@ EOT
|
|
}
|
|
}
|
|
|
|
|
|
$filesystem = $this->container->get('filesystem');
|
|
$filesystem = $this->container->get('filesystem');
|
|
- $filesystem->mirror(__DIR__.'/../Resources/skeleton/bundle', $targetDir);
|
|
|
|
|
|
+ $filesystem->mirror(__DIR__.'/../Resources/skeleton/bundle/generic', $targetDir);
|
|
|
|
+ $filesystem->mirror(__DIR__.'/../Resources/skeleton/bundle/'.$input->getOption('format'), $targetDir);
|
|
|
|
|
|
Mustache::renderDir($targetDir, array(
|
|
Mustache::renderDir($targetDir, array(
|
|
'namespace' => $namespace,
|
|
'namespace' => $namespace,
|