[FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper

This commit is contained in:
Sarah Khalil 2013-07-13 23:39:16 +02:00
parent 63e6368dc0
commit 31c6c627f2
1 changed files with 5 additions and 1 deletions

View File

@ -66,10 +66,14 @@ EOF
if (empty($name)) {
$output->writeln('Available registered bundles with their extension alias if available:');
$table = $this->getHelperSet()->get('table');
$table->setHeaders(array('Bundle name','Extension alias'));
foreach ($bundles as $bundle) {
$extension = $bundle->getContainerExtension();
$output->writeln($bundle->getName().($extension ? ': '.$extension->getAlias() : ''));
$table->addRow(array($bundle->getName(), $extension ? $extension->getAlias() : ''));
}
$table->render($output);
return;
}