minor #8487 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper (saro0h)

This PR was merged into the master branch.

Discussion
----------

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

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no

Commits
-------

31c6c62 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper
This commit is contained in:
Fabien Potencier 2013-10-01 19:32:30 +02:00
commit e47677edd5

View File

@ -69,10 +69,14 @@ EOF
if (empty($name)) { if (empty($name)) {
$output->writeln('Available registered bundles with their extension alias if available:'); $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) { foreach ($bundles as $bundle) {
$extension = $bundle->getContainerExtension(); $extension = $bundle->getContainerExtension();
$output->writeln($bundle->getName().($extension ? ': '.$extension->getAlias() : '')); $table->addRow(array($bundle->getName(), $extension ? $extension->getAlias() : ''));
} }
$table->render($output);
return; return;
} }